peschn opened a new issue #7382: GRU not working with layout 'NTC'
   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/", line 14, in <module>
       output, hn = layer(input, h0)
 line 251, in __call__
       return self.forward(*args)
 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.
   import mxnet as mx
   batch_size = 8
   timesteps = 7
   nhidden = 100
   layers = 2
   nin = 10
   layer = mx.gluon.rnn.GRU(nhidden, layers, layout='NTC')
   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:

With regards,
Apache Git Services

Reply via email to