forked from open-mmlab/mmsegmentation
-
Notifications
You must be signed in to change notification settings - Fork 222
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
How to convert pytorch to onnx? #73
Comments
I'm also looking to convert the model to onnx. If possible please suggest alternate for |
Add the following code to @parse_args('v', 'is', 'is')
def roll(g, self, shifts, dims):
assert len(shifts) == len(dims)
result = self
for i in range(len(shifts)):
shapes = []
shape = sym_help._slice_helper(g,
result,
axes=[dims[i]],
starts=[-shifts[i]],
ends=[maxsize])
shapes.append(shape)
shape = sym_help._slice_helper(g,
result,
axes=[dims[i]],
starts=[0],
ends=[-shifts[i]])
shapes.append(shape)
result = g.op("Concat", *shapes, axis_i=dims[i])
return result Reference: pytorch/pytorch#68974 |
this did not work. :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tools/pytorch2onnx.py
python tools/pytorch2onnx.py configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k.py
Error: Exporting the operator roll to ONNX opset version 11 is not supported. Please open a bug to request ONNX export support for the missing operator.
The text was updated successfully, but these errors were encountered: