Skip to content

Commit

Permalink
Update export.py
Browse files Browse the repository at this point in the history
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 <58831491+Doquey@users.noreply.github.com>
  • Loading branch information
Doquey authored Sep 28, 2023
1 parent db10b82 commit 929bc87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def export_onnx(model, im, file, opset, dynamic, simplify, prefix=colorstr('ONNX
import onnx

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

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

0 comments on commit 929bc87

Please sign in to comment.