How avi-avishekh/pinn-at-y-x-2 works
This repository is a small PyTorch physics-informed neural network (PINN) example for approximating a function subject to a derivative equation and boundary condition. The main workflow in training.py builds collocation inputs, trains the network against physics and boundary losses, then compares predictions with an exact solution and plots the results. derivative.py is a separate one-step autograd and optimizer demonstration; it does not import or invoke the training script. The README is empty, and the notebook was not sampled, so its behavior is not represented.
Main entry points: training.py Training Run · derivative.py PINN Network
Components 17
PINN Training
- Training Run
training.py - Collocation Inputs
training.py - PINN Network
training.py - Autograd Derivative
training.py - Physics and Boundary Loss
training.py - Adam Updates
training.py
Evaluation
- Predictions
training.py - Exact Solution
training.py - Absolute Error and MAE
training.py - Comparison Plot
training.py
Derivative Demo
- Single-Step Demo
derivative.py - Collocation Inputs
derivative.py - PINN Network
derivative.py - Autograd Derivative
derivative.py - Physics and Boundary Loss
derivative.py - Adam Update
derivative.py
Other components
- User
Connections 31
- User → Training Run: starts
- Training Run → Collocation Inputs: creates
- Training Run → PINN Network: creates
- Training Run → Adam Updates: creates
- Collocation Inputs → PINN Network: supplies inputs
- PINN Network → Autograd Derivative: produces values
- Collocation Inputs → Autograd Derivative: provides coordinates
- Autograd Derivative → Physics and Boundary Loss: supplies derivative
- PINN Network → Physics and Boundary Loss: supplies boundary value
- Physics and Boundary Loss → Adam Updates: backpropagates loss
- Adam Updates → PINN Network: updates parameters
- Training Run → Predictions: evaluates
- PINN Network → Predictions: produces
- Collocation Inputs → Predictions: provides coordinates
- Training Run → Exact Solution: computes
- Predictions → Absolute Error and MAE: compared against
- Exact Solution → Absolute Error and MAE: provides reference
- Training Run → Comparison Plot: plots
- Predictions → Comparison Plot: supplies values
- Exact Solution → Comparison Plot: supplies reference
- User → Single-Step Demo: starts
- Single-Step Demo → Collocation Inputs: creates
- Single-Step Demo → PINN Network: creates
- Single-Step Demo → Adam Update: creates
- Collocation Inputs → PINN Network: supplies inputs
- PINN Network → Autograd Derivative: produces values
- Collocation Inputs → Autograd Derivative: provides coordinates
- Autograd Derivative → Physics and Boundary Loss: supplies derivative
- PINN Network → Physics and Boundary Loss: supplies boundary value
- Physics and Boundary Loss → Adam Update: backpropagates loss
- Adam Update → PINN Network: updates parameters