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/20 14:02:42 UTC

[GitHub] relaxli00 opened a new issue #9508: Gluon Conv1DTranspose causes "kernel died"

relaxli00 opened a new issue #9508: Gluon Conv1DTranspose causes "kernel died" 
URL: https://github.com/apache/incubator-mxnet/issues/9508
 
 
   Using pip-installed mxnet-cu90-1.0.1b20171229. Similar codes, Conv2DTranspose works fine and Conv1DTranspose causes kernel death, in Spyder 3.2.6.  Windows 10 / Anaconda 3 / Python 3.6
   
   The working code with Conv2DTranspose:
   ==== 2D code ====
   import mxnet as mx
   from mxnet import gluon as g
   import numpy as np
   
   ctx = mx.cpu()
   img = np.zeros((1, 3, 7))
   img = img.reshape(img.shape[0], 3, 7, 1)
   dataLoader = g.data.DataLoader(img, batch_size=1)
   
   net = g.nn.Sequential()
   with net.name_scope():
   #    net.add(g.nn.Conv1DTranspose(channels=3, kernel_size=3, activation='relu'))
       net.add(g.nn.Conv2DTranspose(channels=3, kernel_size=(3,1), activation='relu'))
   
   net.collect_params().initialize(mx.init.Normal(sigma=0.05))
   
   for data in dataLoader:
       img = data.astype('float32')
       img = img.as_in_context(ctx)
       output = net(img)
   ==== 2D code end ====
   
   Changed to 1D case, kernel dies every time:
   ==== 1D code ====
   import mxnet as mx
   from mxnet import gluon as g
   import numpy as np
   
   ctx = mx.cpu()
   
   img = np.zeros((1, 3, 7))
   # img = img.reshape(img.shape[0], 3, 7, 1)
   dataLoader = g.data.DataLoader(img, batch_size=1)
   
   net = g.nn.Sequential()
   with net.name_scope():
       net.add(g.nn.Conv1DTranspose(channels=3, kernel_size=3, activation='relu'))
   #    net.add(g.nn.Conv2DTranspose(channels=3, kernel_size=(3,1), activation='relu'))
   
   net.collect_params().initialize(mx.init.Normal(sigma=0.05))
   
   for data in dataLoader:
       img = data.astype('float32')
       img = img.as_in_context(ctx)
       output = net(img)
   ==== 1D code end ====
   
   Is there any trick for the Conv1DTranspose usage?
   
   Thanks.

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