How to get weight and bias from the NeuralPDE after solving

I try to use NeuralPDE to solve the differential equations.
How could I get the weight and bias from network and may I use the weight after solving to predict the similar problem?
Thank you all.

It’s the OptimizationSolution, res.u, as shown in the tutorial. See for example:

https://docs.sciml.ai/NeuralPDE/dev/tutorials/pdesystem/#Copy-Pasteable-Code

The tutorial does not mention on how could we saving the weight and reuse it to predict the solution for the similar system. Do you have any experiences about saving and reusing the training network?

You can save it any way you’d save an array, JLD2 or whatever. It reuses it for predictions in the plots in the tutorial.

The tutorial just create new chains with random weight and zero bias. For the plotting phase, it also use the weight after training to predict the values of variables. However, I would like to ask the method to load the pretrained weight into the chains and predict the new values.

The construction takes an argument init_params to pass in previously trained network parameters. See

https://neuralpde.sciml.ai/stable/manual/pinns/#NeuralPDE.PhysicsInformedNN