The following code snippet works:
trained_network = ...
torch.save(trained_network, 'final-model.pt')
new_network = torch.load('final-model.pt', map_location='cpu')

evaluation(new_network)  # new_network performs good

But using state_dict to save/load does not work:
trained_network = ...
torch.save(trained_network.state_dict(), 'final-model.pt')
new_network = init_model(...)
new_network.load_state_dict(torch.load('final-model.pt'))

evaluation(new_network)  # new_network performs bad, just like a model without training

I would like to use latter approach as it is the recommended way. How can I fix it ?