Closed Like2021 closed 11 months ago
It seems like a bug of GatherElements. The output shape should be outtensors[0].update_shape(intensors[1].get_shape())
. Is your graph with tensor shapes (in your posted image) generated by onnx_tool?
I've fixed the bug of GatherElements in this commit 1d170c782aeaa59771bd3d0c4f4e556769d38a54. Thanks for your feedback!
No, it is not generated by onnx_tool.
It seems like a bug of GatherElements. The output shape should be
outtensors[0].update_shape(intensors[1].get_shape())
. Is your graph with tensor shapes (in your posted image) generated by onnx_tool?
Thanks for your excellent open source work, I guess I've run into a new problem.
I have a GatherElements operator, like:
This operator has two inputs. The input shapes are 1×195 and 1×196 respectively. When i use
onnx_tool.share_infer()
, I found that GatherElements node will callshape_infer
directly, like:According to the code, it will directly default the output shape to be the same as the first Tensor of intensors, but for this GatherElements node, its Indices should be 1×195 input, then the output should be consistent with Indices, which is also 1×195, not 1×196.
The node attribute
shape_calc
will call the functionshape_infer
if it is False,so I guess
shape_calc
about GatherElements should be True?Could you give some tips for this situation?