Hey! Thanks for the reply.
I use torch.save(model.sate_dict, filename) to save, and then I use:
model = train.Net 21()
model.load_state_dict(torch.load(filename))
in order to load the model.
I think the problem has something to do with the fact that I am using:
old_model = nn.Sequential(*list(model.children())).cuda(),
after loading the model.
I have done it this way so I have the ability to create a sub-network by indexing model.children(), which works as long as I index up to but not including the first linear layer.
I’m not sure how much liberty I have in sharing all of the code, but I can include snippets.
Thank you!