Module torch.onnx export create a graph containing an operator named "ATen"

Hello folks,

I have been using the ONNX exporter recently, and I have a question for peoples who had some experience with the exporter and ONNX contributors.

In my model, one of my layers have:

std = x.std(dim=(2, 3))[:, :, None, None]
std[std == 0] = 1
x /= std

I know that their is some in place operations, but that shouldn’t cause any trouble in this specific case. (or maybe it does :smile: )
What surprised me is the exported graph I obtain. It contain a non ONNX node named “ATen” (if you are familiar with pytorch.onnx, ATen are a category of operators. An operator is ATen if you can find his definition in torch/csrc/autograd/generated/VariableType.h)

Here is a picture of the graph:

I can probably fix this by rewriting my code as follow:

std = std + (std == 0).double()  # Replace 0 values by 1
x /= std

But I am curious how a node that is not an ONNX operator have appeared during the export. Seems to me like a little nasty bug. :sweat_smile: