```
class GatherND(OnnxOpConverter):
"""Operator converter for GatherND."""
@classmethod
def _impl_common(cls, data, indices, batch_dims=0):
indices_dims = len(infer_shape(indices))
indices_shape = infer_shape(indices)
indices = _op.transpose(indices, axes=[-1] + list(range(indices_dims -
1)))
index_rank = indices_shape[-1]
return _op.gather_nd(data, indices, batch_dims, index_rank)
```
## Observation
In `python/tvm/relay/onnx.py`, I found `_op.transpose()` was inserted before
real `_op.gather_nd` operator. Actually, other OnnxOpConverters, like
`ScatterND` have same or more relative insertions before the real ops.
In test_cases however, `test_op_level3.py`, input data are fed into
`relay.gather_nd` directly.
## Question
Is this `_op.transpose` necessary? What would happen to dataflow if we remove
it?
Thanks!
---
[Visit
Topic](https://discuss.tvm.apache.org/t/relay-frontend-why-transpose-before-gathernd/10657/1)
to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click
here](https://discuss.tvm.apache.org/email/unsubscribe/be3c1b85c839320860ac34c565105b2929c59395495b54164f7bde0334e1661f).