Skip to content

Commit

Permalink
ONNX export explicit cpu map_location
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jun 12, 2020
1 parent ad71d2d commit 1e2cb6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/onnx_export.py
Expand Up @@ -25,7 +25,7 @@

# Load pytorch model
google_utils.attempt_download(opt.weights)
model = torch.load(opt.weights)['model']
model = torch.load(opt.weights, map_location=torch.device('cpu'))['model']
model.eval()
model.fuse()

Expand Down

0 comments on commit 1e2cb6b

Please sign in to comment.