MaxPool op resolved as Aten OP
See original GitHub issueI created a small model training script, to test out maxpool gradient op for OneDNN EP, and the model definition below was used. But for some reason, the maxpool was resolved to Aten Op in the onnx graph. Is there a way to force torch-ort to use maxpool instead aten op? (maybe by disabling use of aten ops?)
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(1, 10, kernel_size=5)
self.conv2 = nn.Conv2d(10, 20, kernel_size=5)
self.maxpool1 = nn.MaxPool2d(2)
self.maxpool2 = nn.MaxPool2d(2)
#self.conv2_drop = nn.Dropout2d()
self.fc1 = nn.Linear(320, 50)
self.fc2 = nn.Linear(50, 10)
def forward(self, x):
x = F.relu(self.maxpool1(self.conv1(x)))
x = F.relu(self.maxpool2(self.conv2(x)))
x = x.view(-1, 320)
x = F.relu(self.fc1(x))
x = F.dropout(x, training=self.training)
x = self.fc2(x)
return F.log_softmax(x)
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
onnx/Operators.md at main - GitHub
This op uses the population size (N) for calculating variance, and not the sample size N-1. Type Constraints. T : tensor(float16), tensor(float), tensor(double) ......
Read more >torch.onnx — PyTorch 1.13 documentation
When export fails due to an unconvertible ATen op, there may in fact be more than one such op but the error message...
Read more >docs/source/onnx.rst - PyTorch - Fossies
ATen is PyTorch's built-in tensor library. If the operator is an ATen operator (shows up in the TorchScript graph with the prefix aten::...
Read more >torch.onnx — PyTorch master documentation
This mode is used to export all operators as ATen ops, and avoid conversion to ONNX. Example torch ir graph: graph(%0 : Float(2:12,...
Read more >torch.onnx — PyTorch master documentation
Make sure the function has the same name as the ATen operator/function defined in VariableType.h . The first parameter is always the exported...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chethanpk I just tried this on my end as well. If I comment out this code in my local pip directory, I can avoid generating the Aten nodes that you’re seeing in your graph. Here is the sample I am using (from you example):
Here is the graph I get:
Rebuilding the wheel worked, thanks.