You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/03/03 01:51:06 UTC

[GitHub] wkcn edited a comment on issue #14264: nd.reshape truncate values

wkcn edited a comment on issue #14264: nd.reshape truncate values
URL: https://github.com/apache/incubator-mxnet/issues/14264#issuecomment-468978127
 
 
   In my opinion, we should fix the bug in Reshape OP, and add a new operator named    adapted_crop to get the interesting feature.
   
   e.g.
   
   a = nd.zeros((3,6,9))
   b = nd.zeros((2,8,5))
   a_crop, b_crop = nd.adapted_crop(a, b, mode='tiny',merge=False)
   a_crop2, b_crop2 = nd.adapted_crop(a, b, mode='full', fill_value=3, merge=False)
   
   it is equivalent to the following code:
   a_crop = a[:2,:6,:5]
   b_crop = b[:2,:6,:5]
   
   a_crop2 = nd.full((3,8,9), fill_value=3)
   a_crop2[:3,:6,:9] = a
   
   b_crop2 = nd.full((3,8,9), fill_value=3)
   b_crop2[:2,:8,:5] = b
   
   
   Meanwhile, we also add a flag to support single output.

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


With regards,
Apache Git Services