RuRo edited a comment on issue #17711: [ONNX export] Fixing spatial export for batchnorm URL: https://github.com/apache/incubator-mxnet/pull/17711#issuecomment-595688027 As far as I understand, `spatial=1` is the default in all versions of the `BatchNormalization` operator. The newer versions don't have this attribute, but still do a computation as if `spatial=1`, so I think we are better off removing the explicit attribute and relying on the default behaviour, since specifying it explicitly will make it harder to convert to newer ONNX opset versions. What do you think? Edit: The comment says that the default for ONNX is to compute `across all spatial features`, but the docs [here](https://github.com/onnx/onnx/blob/master/docs/Changelog.md) say `spatial : int (default is 1)` for all BatchNormalization ops that have this attribute. Admittedly, the ONNX documentation wording is really confusing, but I think, it should be interpreted as > spatial : int (default is 1) > If true, compute the mean and variance across per activation. If true (default), perform the reduce operations across the spatial dimensions (HW), keeping the channels/features intact. > If false, compute the mean and variance across per feature over each mini-batch. If false (0), also reduce across the channels/features dimension (C).
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services