Hi,
I want to save a trained NeuralPDE model and then load it to some other script at a later time for analysis and post-processing.
In this reply it is suggested to save the trained Lux parameters stored in res.u
. I am doing that through
using JLD2
# @save "trained_model.jld2" res.u
However, the actual representation of the solution is not stored there and I am not sure where should I feed these parameters to get the trained model. Should one recreate the entire sys, strategy, discretization, prob
sequence and then use the stored pretrained parameters? This is rather slow as it unnecessarily compiles a bunch of things that are not going to be used. The solution I am thinking is to save discretization.phi
or res.cache.f.f.phi
, bu can these be saved in the same way as res.u
?
Thanks in advance for the help.