[TVM Discuss] [Development] Gather_nd semantics

2020-04-09 Thread adobay via TVM Discuss
[quote="kazum, post:6, topic:6243"] in_indices [/quote] ha-ha,great. can you help me review my pull request about cumsum? thanks. https://github.com/apache/incubator-tvm/pull/5289 --- [Visit Topic](https://discuss.tvm.ai/t/gather-nd-semantics/6243/7) to respond. You are receiving this be

[TVM Discuss] [Development] Gather_nd semantics

2020-04-09 Thread Morita Kazutaka via TVM Discuss
[quote="adobay, post:5, topic:6243"] ``` in_indices = tf.placeholder(tf.float32, np_indices.shape, name="in_indices") out = tf.gather_nd(in_data, indices) ``` [/quote] These lines should be ``` in_indices = tf.placeholder(tf.int32, np_indices.shape, name="in_indices") out = tf.gather_nd(in_data,

[TVM Discuss] [Development] Gather_nd semantics

2020-04-08 Thread adobay via TVM Discuss
seems incorrect, can not pass my test case@kazum ```python ### # GatherNd # -- def _gather_nd(in_shape, indices): """test operator GatherNd""" np_indices = np.asarray(indices, dtype='int32') tf

[TVM Discuss] [Development] Gather_nd semantics

2020-04-08 Thread Morita Kazutaka via TVM Discuss
https://github.com/apache/incubator-tvm/pull/5279 --- [Visit Topic](https://discuss.tvm.ai/t/gather-nd-semantics/6243/3) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/704e7a

[TVM Discuss] [Development] Gather_nd semantics

2020-04-08 Thread Morita Kazutaka via TVM Discuss
I think we don't need to change the current semantics. We can easily implement Tensorflow gather_nd with the mxnet gather_nd (and vice versa). Here is a pseudo code: ``` tf_gather_nd(data, indices) = relay.gather_nd(data, transpose(indices, [N-1, 0, 1, ..., N-2])) ``` where N is the dimension

[TVM Discuss] [Development] Gather_nd semantics

2020-04-06 Thread Haichen Shen via TVM Discuss
Currently Relay `gather_nd` op uses the [mxnet semantic](https://mxnet.apache.org/api/python/docs/api/ndarray/op/index.html#mxnet.ndarray.op.gather_nd), which each column in `indices` indicates the indices in `data`. However, Tensorflow [`gather_nd`](https://www.tensorflow.org/api_docs/python