Skip to content

Instantly share code, notes, and snippets.

@J3698
Created December 21, 2021 20:38
Show Gist options
  • Save J3698/4ee32bd2c2ef5a9cdac6a64e7c7e7219 to your computer and use it in GitHub Desktop.
Save J3698/4ee32bd2c2ef5a9cdac6a64e7c7e7219 to your computer and use it in GitHub Desktop.
model = Model()
model.eval()
state_dict = torch.load("Test.pt", map_location = torch.device("cpu"))
model.load_state_dict(state_dict['model'])
size = 32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment