I want to copy Module1
's params into Module2
, but I want the 2 modules to be independent thereafter.
Is it enough to do Module2.load_state_dict(Module1.state_dict())
?
Or do I have to do Module2.load_state_dict(copy.deepcopy(Module1.state_dict()))
?