Browse Source

ONNX export explicit cpu map_location

5.0
Glenn Jocher 4 years ago
parent
commit
1e2cb6b480
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/onnx_export.py

+ 1
- 1
models/onnx_export.py View File

@@ -25,7 +25,7 @@ if __name__ == '__main__':

# 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()


Loading…
Cancel
Save