logo
Browse Source

Fix opset version

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 2 years ago
parent
commit
e9fc0c703a
  1. 3
      auto_transformers.py

3
auto_transformers.py

@ -212,7 +212,8 @@ class AutoTransformers(NNOperator):
input_names=list(self.onnx_config['inputs'].keys()),
output_names=list(self.onnx_config['outputs'].keys()),
dynamic_axes=dynamic_axes,
opset_version=torch.onnx.constant_folding_opset_versions[-1],
opset_version=torch.onnx.constant_folding_opset_versions[-1] if hasattr(
torch.onnx, 'constant_folding_opset_versions') else 14,
do_constant_folding=True,
)
# todo: elif format == 'tensorrt':

Loading…
Cancel
Save