haojin2 commented on a change in pull request #11326: [MXNET-381] Enhancement 
of take operator
URL: https://github.com/apache/incubator-mxnet/pull/11326#discussion_r199332168
 
 

 ##########
 File path: src/operator/tensor/indexing_op.cc
 ##########
 @@ -360,21 +360,24 @@ NNVM_REGISTER_OP(take)
 
 This function slices the input array along a particular axis with the provided 
indices.
 
-Given an input array with shape ``(d0, d1, d2)`` and indices with shape ``(i0, 
i1)``, the output
-will have shape ``(i0, i1, d1, d2)``, computed by::
+Given an input tensor with shape ``(d0, d1, d2)`` and indices with shape 
``(i0, i1)``, and axis=1,
+the output will have shape ``(d0, i0, i1, d2)``, computed by::
 
-  output[i,j,:,:] = input[indices[i,j],:,:]
+  output[:,i,j,:] = input[:,indices[i,j],:]
 
 .. note::
-   - `axis`- Only slicing along axis 0 is supported for now.
-   - `mode`- Only `clip` mode is supported for now.
+   - `axis`- Could be from -r to r-1 where r is the rank of input tensor
+   - `mode`- Could be either `clip` or `wrap`.
 
 Examples::
 
 Review comment:
   Due to lack of extra blank lines, fixed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to