Skip to content

Instantly share code, notes, and snippets.

@KerryHalupka
Created August 16, 2020 08:47
Show Gist options
  • Save KerryHalupka/cace928fee6bf1748662af70c222070c to your computer and use it in GitHub Desktop.
Save KerryHalupka/cace928fee6bf1748662af70c222070c to your computer and use it in GitHub Desktop.
#load model weights
model.load_state_dict(torch.load(ckpt_dir))
for inputs, targets in test_gen:
# use GPU if available
inputs = inputs.to(device)
inputs = inputs.float()
outputs = model(inputs)
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment