specify ONNX opset version
I had an error when trying to convert the LOP model from ONNX to SADL float. The error was from the Slice node in the ONNX model and SADL converter has an error initializing the Slice node. After some debugging, I found that it was the ONNX opset version that caused the problem.
When I specify "opset_version=10", everything works fine, but if I use "opset_version=9", there is an error and by default the opset version is 9. I found some more information in this page regarding the Slice node “In Slice-10 (opset version=10), the attributes for Slice like starts, ends axes, steps have been moved to input”. I also tested opset version 11, 12, 13, and they all work fine.
I don't know which ONNX opset version has been tested for SADL converter, but perhaps it is helpful to specify the opset version to avoid version conflict.
Current:
modelobj.SADL_model.to_onnx(args.output, args.patch_size, args.batch_size)
Suggest:
modelobj.SADL_model.to_onnx(args.output, args.patch_size, args.batch_size, opset_version=xx)
There are two places calling SADL_model.to_onnx
, one in training/trainer.py, one in convert/to_onnx.py.