reminisce commented on issue #8048: Bug in backprop for the transpose of a 
   @dmadeka I was trying to debug this issue, but couldn't reproduce it using 
the latest master branch code. My script is as the following. Could you please 
confirm whether the problem still exists? From what you described, this is more 
like an issue of the graph executor assigning wrong `req` to the input of the 
`transpose` operator.
   import mxnet as mx
   def ttake(x, i):
       """Take from axis 1 instead of 0."""
       return mx.sym.flatten(mx.sym.transpose(mx.sym.take(mx.sym.transpose(x), 
   shape = (4, 5)
   data = mx.sym.Variable('data', shape=(4, 5))
   indices = mx.sym.Variable('indices', shape=(1,))
   sym = ttake(data, indices)
   exe = sym.simple_bind(ctx=mx.cpu(), grad_req={'data': 'write', 'indices': 
   exe.arg_dict[][:] = mx.nd.arange(shape[0] * shape[1]).reshape(shape)
   exe.arg_dict[][:] = mx.nd.array([0], dtype='int32')
   output = exe.forward()[0]

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:

With regards,
Apache Git Services

Reply via email to