Modify TorchScript model parameters using libtorch C++ API

Thanks for your response.

I tried a similar approach (something like this), but I can only get const references to the parameters, so cannot manipulate their values for a scripted model. The manipulation only works with a torch::nn::Module instance.

Is there any API in libtorch that would get me either pointers or non-const references to a scripted models’ parameters?