peschn opened a new issue #7382: GRU not working with layout 'NTC'
URL: https://github.com/apache/incubator-mxnet/issues/7382
 
 
   For bugs or installation issues, please provide the following information.
   The more information you provide, the more likely people will be able to 
help you.
   
   ## Environment info
   Operating System: Ubuntu 16.04.2 LTS
   
   Package used (Python/R/Scala/Julia): Python
   
   MXNet version: mxnet-cu80==0.10.1b20170803
   
   If you are using python package, please provide
   
   Python version and distribution: python 2.7.13, used with anaconda 4.2.23
   
   R `sessionInfo()`:
   
   ## Error Message:
   Please paste the full error message, including stack trace.
   
   ???
   Traceback (most recent call last):
     File "simply/mx/test_rnn.py", line 14, in <module>
       output, hn = layer(input, h0)
     File 
"/home/huxley/dev/miniconda2/envs/mxnet/lib/python2.7/site-packages/mxnet/gluon/block.py",
 line 251, in __call__
       return self.forward(*args)
     File 
"/home/huxley/dev/miniconda2/envs/mxnet/lib/python2.7/site-packages/mxnet/gluon/rnn/rnn_layer.py",
 line 162, in forward
       str(info['shape']), str(state.shape)))
   ValueError: Invalid recurrent state shape. Expecting (2, 2L, 100), got (2L, 
8L, 100L).
   ???
   
   ## Minimum reproducible example
   if you are using your own code, please provide a short script that 
reproduces the error.
   
   ## Steps to reproduce
   or if you are running standard examples, please provide the commands you 
have run that lead to the error.
   
   ???python
   import mxnet as mx
   
   batch_size = 8
   timesteps = 7
   nhidden = 100
   layers = 2
   nin = 10
   
   layer = mx.gluon.rnn.GRU(nhidden, layers, layout='NTC')
   layer.initialize()
   
   input = mx.nd.random_uniform(shape=(batch_size, timesteps, nin))
   h0 = mx.nd.random_uniform(shape=(layers, batch_size, nhidden))
   output, hn = layer(input, h0)
   ???
   ## What have you tried to solve it?
   
   The only thing that solves it is changing the layout (and the data 
accordingly) to 'TNC'.
   
 
----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to