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 2018/01/14 05:02:43 UTC

[GitHub] xuw080 commented on issue #9413: training on GAN on multiple GPU, found this error: mxnet.base.MXNetError: [14:39:38] src/ndarray/ndarray.cc:518: Check failed: from.shape() == to.shape() operands shape mismatchfrom.shape = [1,293,256,14,14] to.shape=[293,256,14,14]

xuw080 commented on issue #9413: training on GAN on multiple GPU, found this error: mxnet.base.MXNetError: [14:39:38] src/ndarray/ndarray.cc:518: Check failed: from.shape() == to.shape() operands shape mismatchfrom.shape = [1,293,256,14,14] to.shape=[293,256,14,14]
URL: https://github.com/apache/incubator-mxnet/issues/9413#issuecomment-357489035
 
 
   Solved.
   add these lines in /incubator-mxnet/python/mxnet/module/executor_group.py before calling exec_.backward(out_grads=out_grads_slice) in def backward(self, out_grads=None):
               if len(out_grads_slice) > 0:
                   out_grads_slice[0] = out_grads_slice[0].reshape((-1, 256, 14, 14))
               exec_.backward(out_grads=out_grads_slice)
   It will change shape of out_grads_slice[0] from [1, a, 256, 14, 14] to [a, 256, 14, 14]. When I was running my code in several GPU, I think mxnet may provide out_grads_slice wrong. If you are running your own data, you can just replace 256, 14, 14 to your own data shape.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services