The spec allows a scalar (0-D) indices operand. Since output rank = rank(input) + rank(indices) − 1, a scalar index over a 1-D input yields a 0-D output:
input : [4] (rank 1)
indices : [] (rank 0, scalar)
axis : 0
=> output: [] (rank 0)
But gather's output rankRange.min is currently 1, which rejects this valid case. The minimum output rank should be 0.
The spec allows a scalar (0-D)
indicesoperand. Sinceoutput rank = rank(input) + rank(indices) − 1, a scalar index over a 1-D input yields a 0-D output:But
gather'soutputrankRange.minis currently 1, which rejects this valid case. The minimum output rank should be 0.