Test dynamic shapes
#15104
Replies: 1 comment
-
You can create models with one op using import torch
class SumModule(torch.nn.Module):
def forward(self, x):
return torch.sum(x, dim=1)
torch.onnx.export(
SumModule(),
(torch.ones(2, 2),),
"onnx.pb",
input_names=["x"],
output_names=["sum"],
dynamic_axes={
# dict value: manually named axes
"x": {0: "my_custom_axis_name"},
# list value: automatic names
"sum": [0],
}
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
I'm writing a custom EP, is there any test unit evaluate the dynamic shape capability? I've been looking for tests that do something like that but can't find anything.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions