glenn-jocher commited on
Commit
e1e3399
1 Parent(s): 8b26e89

ONNX export bug fix #93

Browse files
Files changed (1) hide show
  1. models/onnx_export.py +1 -1
models/onnx_export.py CHANGED
@@ -25,7 +25,7 @@ if __name__ == '__main__':
25
 
26
  # Load pytorch model
27
  google_utils.attempt_download(opt.weights)
28
- model = torch.load(opt.weights, map_location=torch.device('cpu'))['model']
29
  model.eval()
30
  model.fuse()
31
 
 
25
 
26
  # Load pytorch model
27
  google_utils.attempt_download(opt.weights)
28
+ model = torch.load(opt.weights, map_location=torch.device('cpu'))['model'].float()
29
  model.eval()
30
  model.fuse()
31