Skip to content

Commit bb9706e

Browse files
ONNX export Path to str() (ultralytics#12177)
* Update export.py Signed-off-by: Luis Filipe Araujo de Souza <[email protected]> * Update export.py Signed-off-by: Luis Filipe Araujo de Souza <[email protected]> * Update export.py Transformed the f variable into a string on the export onnx. This bug was making it impossible to export any models in .onnx, since it was making the typehint not accept the users input as it is specified in the functions documentation Signed-off-by: Luis Filipe Araujo de Souza <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Luis Filipe Araujo de Souza <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 6262c7f commit bb9706e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def export_onnx(model, im, file, opset, dynamic, simplify, prefix=colorstr('ONNX
155155
import onnx
156156

157157
LOGGER.info(f'\n{prefix} starting export with onnx {onnx.__version__}...')
158-
f = file.with_suffix('.onnx')
158+
f = str(file.with_suffix('.onnx'))
159159

160160
output_names = ['output0', 'output1'] if isinstance(model, SegmentationModel) else ['output0']
161161
if dynamic:

0 commit comments

Comments
 (0)