Streamlining Training Process
The major rewrite is now complete π!
The training process has been simplified and can now be run easily.
Photo by Markus Winkler on Unsplash
π Training the model
A YAML configuration file is used for training parameters. For example, the following configuration is used for 2D Burgerβs Equation:
device: "cuda"
learning_rate: 0.01
Nb: 1000
Nf: 5000
model:
input_dim: 3
hidden_layers: 4
hidden_units: 20
output_dim: 2
epochs: 6000
You can train an example model using the following parameters by:
uv run main.py [--model pinn|pikan] [--config <config_path>] EXAMPLE
The default value of type and config are set to pinn and <default_example_path> respectively. For example, to run burger2d using PIKAN model:
uv run main.py --model pikan burger2d
π οΈ Refactored Examples
The examples are now simplified in the generation of input points. Instead of using multiple functions with similar parameters between them, a single generate_data() function is used.
β¨ New Progress Indicator
The training progress is now shown via progress bar in terminal using the alive-progress library.
Epoch 30, Loss: 0.120250269771 |ββββββββββββββββββββββββββββββββββββββββ| 30/30 [100%] in 4.6s (4.53/s)
You can find our repository under gulfgap/gulfgap!