jpeg729:

model_copy = type(mymodel)() # get a new instance
model_copy.load_state_dict(mymodel.state_dict()) # copy weights and stuff



if there are arguments in the __init__ function of mymodel you must pass them too. type(mymodel)(args)