TriLoo opened a new issue #15635: gluon.nn.Conv2DTranspose() may have a problem 
working with MKLDNN data ?
URL: https://github.com/apache/incubator-mxnet/issues/15635
 
 
   `mxnet version`: 1.5.0
   `OS`: Centos 7.2
   `Python`: 3.6
   `CPU`: Xeon E5-2650 v4
   
   Following code can reproduce this bug on my server: 
   ```python
   import mxnet as mx
   from mxnet import gluon
   class VerifyConcatMKL(gluon.HybridBlock):
       def __init__(self, **kwargs):
           super(VerifyConcatMKL, self).__init__(**kwargs)
           self.conv = gluon.nn.Conv2D(10, 3, 1, 1)
           self.conv1 = gluon.nn.Conv2D(channels=128, kernel_size=3, strides=1, 
padding=1)
           self.deconv1 = gluon.nn.Conv2DTranspose(64, 4, 2, 1)
   
       def hybrid_forward(self, F, x, *args, **kwargs):
           feat = self.conv(x)
           output = self.conv1(feat)
           output = self.deconv1(output)
           return output
   
   net = VerifyConcatMKL()
   net.initialize()
   data = mx.nd.ones((1, 3, 10, 10))
   pred = net(data)
   print(pred) .        # raise an error
   ```
   
   The error info is:
   ```
   mxnet.base.MXNetError: [13:19:25] src/ndarray/ndarray.cc:752: Check failed: 
!IsMKLDNNData(): We can't generate TBlob for MKLDNN data. Please use 
Reorder2Default() to generate a new NDArray first
   ```
   
   **What I found:**
   1.  if the `Conv2DTranspose()` after another `Conv2D()`, one output channel 
of these two operators must less than 24, for example
   ```Python
       self.conv1 = gluon.nn.Conv2D(channels=23, kernel_size=3, strides=1, 
padding=1)
       self.deconv1 = gluon.nn.Conv2DTranspose(64, 4, 2, 1)
   ```
   works fine.
   2. if the `Conv2DTranspose()` calculate the features before the `Conv2D`, 
this error not happen!

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


With regards,
Apache Git Services

Reply via email to