From 1ced66429e55fc04c2dd4a3e10d509ff92d37cec Mon Sep 17 00:00:00 2001 From: niccari Date: Sun, 2 Feb 2025 14:08:06 +0900 Subject: [PATCH] fix: [RT-DETRv2][export_onnx] fixed args typo: file_name -> output_file (#542) --- rtdetrv2_pytorch/tools/export_onnx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtdetrv2_pytorch/tools/export_onnx.py b/rtdetrv2_pytorch/tools/export_onnx.py index 0df6a6060..cc500cfd8 100644 --- a/rtdetrv2_pytorch/tools/export_onnx.py +++ b/rtdetrv2_pytorch/tools/export_onnx.py @@ -76,8 +76,8 @@ def forward(self, images, orig_target_sizes): dynamic = True # input_shapes = {'images': [1, 3, 640, 640], 'orig_target_sizes': [1, 2]} if dynamic else None input_shapes = {'images': data.shape, 'orig_target_sizes': size.shape} if dynamic else None - onnx_model_simplify, check = onnxsim.simplify(args.file_name, input_shapes=input_shapes, dynamic_input_shape=dynamic) - onnx.save(onnx_model_simplify, args.file_name) + onnx_model_simplify, check = onnxsim.simplify(args.output_file, input_shapes=input_shapes, dynamic_input_shape=dynamic) + onnx.save(onnx_model_simplify, args.output_file) print(f'Simplify onnx model {check}...')