Update TorchScript suffix to *.torchscript (#5856)
This commit is contained in:
1 parent
30db14fea8
commit
00e308f7be
5 files changed
+20
-20
No files matched your search
@@ -5,7 +5,7 @@ Export a YOLOv5 PyTorch model to other formats. TensorFlow exports authored by h
|
||||
Format | Example | Export `include=(...)` argument
|
||||
--- | --- | ---
|
||||
PyTorch | yolov5s.pt | -
|
||||
TorchScript | yolov5s.torchscript.pt | 'torchscript'
|
||||
TorchScript | yolov5s.torchscript | 'torchscript'
|
||||
ONNX | yolov5s.onnx | 'onnx'
|
||||
CoreML | yolov5s.mlmodel | 'coreml'
|
||||
TensorFlow SavedModel | yolov5s_saved_model/ | 'saved_model'
|
||||
@@ -19,7 +19,7 @@ Usage:
|
||||
|
||||
Inference:
|
||||
$ python path/to/detect.py --weights yolov5s.pt
|
||||
yolov5s.torchscript.pt
|
||||
yolov5s.torchscript
|
||||
yolov5s.onnx
|
||||
yolov5s.mlmodel (under development)
|
||||
yolov5s_saved_model
|
||||
@@ -66,7 +66,7 @@ def export_torchscript(model, im, file, optimize, prefix=colorstr('TorchScript:'
|
||||
# YOLOv5 TorchScript model export
|
||||
try:
|
||||
LOGGER.info(f'\n{prefix} starting export with torch {torch.__version__}...')
|
||||
f = file.with_suffix('.torchscript.pt')
|
||||
f = file.with_suffix('.torchscript')
|
||||
|
||||
ts = torch.jit.trace(model, im, strict=False)
|
||||
d = {"shape": im.shape, "stride": int(max(model.stride)), "names": model.names}
|
||||
|
||||
Reference in new issue
Block a user