Hi,
Is this the correct way to do it?
std::stringstream stream;
    torch::save(policy_net.layer1,stream);
    torch::load(target_net.layer1,stream);
    std::stringstream().swap(stream);
    torch::save(policy_net.layer2,stream);
    torch::load(target_net.layer2,stream);
    std::stringstream().swap(stream);
    torch::save(policy_net.layer3,stream);
    torch::load(target_net.layer3,stream);

And should I add this as a function to struct DQN?
operator<<(std::ostream &stream, const DQN &module){
???
}