-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attribute new_axis_mask not supported #1814
Comments
Could you also provide a simple repro script python code? |
We were encountering the same issue when we tried to convert a model for which we wrote a custom layer. We were at first a bit confused because we nowhere explicitly used a StridedSlice but figured it was somewhere in the implementation of one of the functions we used. What fixed the issue for us, oddly enough, was to explicitly specify the newest opset. i.e.: model = tf.keras.models.load_model(model_path)
tf2onnx.convert.from_keras(model, output_path="model.onnx") threw the same error @rtm-1dyakonov encountered above, but model = tf.keras.models.load_model(model_path)
tf2onnx.convert.from_keras(model, output_path="model.onnx", opset=15) did not. I guess there may be something wrong with the default opset? Hope that helps :) |
Starting from opset 10, tf2onnx changed the way to handle StridedSlice op and accepted "new_axis_mask" attribute. So your solution is expected. |
Just newly installed tf2onnx and ran into this issue using default values. Should the default opset be set higher to avoid these problems? I'd say ML is a fast enough moving field currently that newer features should be preferred to compatibility for now. |
Yes, there is another PR changing the default opset to 13. Please look forward to next release. Thanks! |
I am trying to convert model created from TensorFlow Object Detection API from saved_model.pb to Onnx format.
Unfortunately, next issue arrises:
ValueError: StridedSlice: attribute new_axis_mask not supported
Here you can find my model either in saved_model and checkpoint formats.
The text was updated successfully, but these errors were encountered: