-
This is a small example of a single linear layer with topK onnx export, producing the indices and values of the topK after applying a linear transformation:
Even though this works as is, I am getting a warning for the output shape:
Is there a better way to define the forward output or the Thank you, IP |
Beta Was this translation helpful? Give feedback.
Answered by
wschin
Dec 28, 2022
Replies: 1 comment 1 reply
-
If you know the expected output shapes. One hack is to load ONNX and edit it directly. import onnx
m = onnx.load("temp_out.onnx")
# edit m.graph.output below
... It's possible to provide |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
iprovalo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you know the expected output shapes. One hack is to load ONNX and edit it directly.
It's possible to provide
dynamic_axis
for outputs intorch.onnx._export
, but it will be error-prone.