and for general Net, the rough solution is before every forward pass, copy the value of params to paddle model, like:
struct PaddleStatelessGeneralNet<:PaddleStatelessModule
NN::PyObject
end
function (stateless_module::PaddleStatelessGeneralNet)(params::Vector, inputs; kwinputs...)
map((p,p_new)->p.set_value(p_new), stateless_module.NN.parameters(), params)
out = stateless_module.NN(inputs)
return out
end
add constructor of FCNet
and for general Net, the rough solution is before every forward pass, copy the value of params to paddle model, like: