Skip to content

Instantly share code, notes, and snippets.

@david-littlefield
Last active November 6, 2020 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save david-littlefield/5cd28b9e8898fc49c4f64b51fff2ed8b to your computer and use it in GitHub Desktop.
Save david-littlefield/5cd28b9e8898fc49c4f64b51fff2ed8b to your computer and use it in GitHub Desktop.
# Line 167
def test_oneimage():
torch.set_grad_enabled(False) # <----------
# load net
cfg = widerface_640
num_classes = len(WIDERFace_CLASSES) + 1 # +1 background
net = build_ssd('test', cfg['min_dim'], num_classes) # initialize SSD
net.load_state_dict(torch.load(args.trained_model))
net.cuda()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment