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/07/11 16:42:03 UTC

[GitHub] [incubator-mxnet] matteosal commented on issue #15497: [MKLDNN] Independent gradients requests check with respect to weights and bias of convolution

matteosal commented on issue #15497: [MKLDNN] Independent gradients requests check with respect to weights and bias of convolution
URL: https://github.com/apache/incubator-mxnet/pull/15497#issuecomment-510563332
 
 
   The example of https://github.com/apache/incubator-mxnet/issues/15464 is fixed here, but I see a failure with this one, where the weights gradient is requested in isolation (so the opposite of https://github.com/apache/incubator-mxnet/issues/15464 ):
   ```
   import mxnet as mx
   
   sym = mx.sym.Convolution(
   	mx.sym.Variable('in'), 
   	mx.sym.Variable('w'), 
   	mx.sym.Variable('b'),
   	kernel=(1, 1), 
   	num_filter=1
   )
   args = {
   	'in': mx.nd.ones([1, 1, 3, 3]),
   	'w': mx.nd.ones([1, 1, 1, 1]),
   	'b': mx.nd.ones([1]),
   }
   grad = {
   	'in': mx.nd.zeros([1, 1, 3, 3]),
   	'w': mx.nd.zeros([1, 1, 1, 1]),
   	'b': mx.nd.zeros([1]),
   }
   req = {'in': 'null', 'w': 'write', 'b': 'null'}
   outgrad = mx.nd.ones([1, 1, 3, 3])
   
   ex = sym.bind(mx.cpu(), args, args_grad=grad, grad_req=req)
   
   ex.forward(True);
   ex.backward(out_grads=outgrad);
   mx.ndarray.waitall()
   ```
   This is what gets printed to command line:
   ```
   Traceback (most recent call last):
     File "script2.py", line 27, in <module>
       mx.ndarray.waitall()
     File "/home/matteo/Git/mxnet/python/mxnet/ndarray/ndarray.py", line 166, in waitall
       check_call(_LIB.MXNDArrayWaitAll())
     File "/home/matteo/Git/mxnet/python/mxnet/base.py", line 253, in check_call
       raise MXNetError(py_str(_LIB.MXGetLastError()))
   mxnet.base.MXNetError: std::exception
   ```
   
   It doesn't fail on master

----------------------------------------------------------------
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