Open
Description
The specifications for Squeeze and Unsqueeze say that the axes
input should be a "list of integers", which I took to mean a 1D tensor. ONNX Runtime expects the axes
input to be a 1D tensor for Squeeze and Reduce* ops, but for Unsqueeze
specifically a change was made in microsoft/onnxruntime#5665 to support scalars as well. The current test cases for Unsqueeze in the onnx repo always pass a vector for the axes
input, although the reference implementation will accept either since numpy functions often allow axis
arguments to be either a scalar or tuple.
I'm not sure what the preferred change is here, but if Unsqueeze
should accept scalar axes
, then the spec should make this clear.