Skip to content

Next Steps

You've trained your first PINN and understand the output. Here's where to go depending on what you want to do.


Modify the physics

Edit the equation in ode.py to change the dynamics. Add or remove fields and parameters in create_problem. The ArgsRegistry pattern means promoting a fixed constant to a learnable parameter is a one-line change: replace Argument(value) with Parameter(config=hp.params_config).

Guide: Promote a constant to a parameter

Tune hyperparameters

Adjust learning rate, network architecture, loss weights, and collocation density in config.py. The frozen dataclass ensures typos are caught immediately.

Guide: Tune hyperparameters

Use your own data

Re-scaffold with --data csv, place your CSV in data/, and update the data loading in ode.py to match your column names.

Guide: Use CSV data

Try a different template

Each template demonstrates different AnyPINN features: Fourier encodings (Lotka-Volterra), Huber loss (Lorenz), boundary conditions (Poisson 2D), adaptive collocation (Burgers 1D). Scaffold several and compare how the physics and config differ.

Browse the catalog

Define your own ODE/PDE

Start from the Custom or Blank template and write your own equation, fields, and parameters from scratch.

Guide: Define a custom problem

Drop Lightning

If you need a non-standard training procedure, re-scaffold with --no-lightning. The generated train.py gives you a raw PyTorch loop where problem is a plain nn.Module and problem.training_loss(batch, log) returns a scalar tensor.

Guide: Lightning vs Core

Explore the API

The full API reference documents every public class and function.

API Reference