YOLOv5 v5.0 Release patch 1 (#2764)
* torch.jit.trace(model, img, strict=False) * Update check_file() * Update hubconf.py * Update README.md
This commit is contained in:
1 parent
f5b8f7d54c
commit
0f395b3e3b
4 files changed
+8
-8
No files matched your search
+1
-1
@@ -62,7 +62,7 @@ if __name__ == '__main__':
|
||||
try:
|
||||
print('\nStarting TorchScript export with torch %s...' % torch.__version__)
|
||||
f = opt.weights.replace('.pt', '.torchscript.pt') # filename
|
||||
ts = torch.jit.trace(model, img)
|
||||
ts = torch.jit.trace(model, img, strict=False)
|
||||
ts.save(f)
|
||||
print('TorchScript export success, saved as %s' % f)
|
||||
except Exception as e:
|
||||
|
||||
Reference in new issue
Block a user