We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cae8a4 commit ceca5efCopy full SHA for ceca5ef
timm/utils/onnx.py
@@ -78,9 +78,8 @@ def onnx_export(
78
export_options=export_options,
79
)
80
export_output.save(output_file)
81
- torch_out = None
82
else:
83
- torch_out = torch.onnx.export(
+ torch.onnx.export(
84
model,
85
example_input,
86
output_file,
@@ -101,9 +100,5 @@ def onnx_export(
101
100
if check_forward and not training:
102
import numpy as np
103
onnx_out = onnx_forward(output_file, example_input)
104
- if torch_out is not None:
105
- np.testing.assert_almost_equal(torch_out.numpy(), onnx_out, decimal=3)
106
- np.testing.assert_almost_equal(original_out.numpy(), torch_out.numpy(), decimal=5)
107
- else:
108
- np.testing.assert_almost_equal(original_out.numpy(), onnx_out, decimal=3)
+ np.testing.assert_almost_equal(original_out.numpy(), onnx_out, decimal=3)
109
0 commit comments