sandeep-krishnamurthy opened a new issue #11349: Infer shape partial returns () 
after slice / slice_axis operations
URL: https://github.com/apache/incubator-mxnet/issues/11349
 
 
   Code snippet
   
   ```
   var1 = mx.sym.var(name="data", shape=(0,20))
   var2 = mx.sym.slice(var1,begin=(None, None), end=(None,10))
   var2.infer_shape_partial()
   
   # Actual Output : ([(0, 20)], [()], [])
   
   # Expected Output: ([(0, 20)], [(0,10)], [])
   ```
   Same behavior for `slice_axis` and `slice` operators.
   To summarize: Even if one dimension is 0 (i.e., unknown), infer shape 
partial returns empty tuple.
   
   However, note that if you use other operators like broadcast_add() 
broadcast_sub() etc. will return expected output on infer_shape_partial().
   
   Per @reminisce  - This is a buggy behavior in few operators. 
https://github.com/apache/incubator-mxnet/blob/master/src/operator/tensor/matrix_op-inl.h#L693
 => This makes it return early than try to infer partial shapes.
   
   This is a blocking issue in keras-mxnet for users who use slice operator and 
custom loss functionality.
   
   @rahul003 
   
    
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to