Hi,
My question is how to copy the values of trainable parameters from one network to another
using the libtorch c++ API.
More precisely:
I have a custom Network class derived from torch::nn::Module and two instances of this class named n1 and n2. I want to copy the trainable parameters from n2 to n1.
In pytorch this can be achieved by n1.load_state_dict(n2.state_dict()), but the network class has no such methods in the c++ API. (Seems to be related to the clone merhod, but I could not figure out how to use it)