the_model = torch.load(path)
the_model.load_state_dict(torch.load(path))

What does the file save? the entire model or just the weights?
btw, could you please format your code a little (with proper indent)?