ctc_tensorflow_example icon indicating copy to clipboard operation
ctc_tensorflow_example copied to clipboard

Multilayer problem

Open oppasource opened this issue 7 years ago • 5 comments

When I change the num_layers to some other value (tried 2, 3 and 4). It gives a Value Error. The error is as follows..... ValueError: Trying to share variable rnn/multi_rnn_cell/cell_0/lstm_cell/kernel, but specified shape (100, 200) and found shape (63, 200).

This error occurred on line 110 of ctc_tensorflow_example.py Am I doing something wrong or is there any other value that needs to be changed. Please help

oppasource avatar Jun 16 '17 09:06 oppasource

using tf vers 1.2 . I am also getting this error. Anyone found out how to correctly use MultiRNNCell with this example?

Robomate avatar Jul 17 '17 13:07 Robomate

I found this solution here https://danijar.com/introduction-to-recurrent-networks-in-tensorflow/:

cells = []
for _ in range(num_layers):
  cell = tf.contrib.rnn.GRUCell(num_units)  # Or LSTMCell(num_units)
  cells.append(cell)
cell = tf.contrib.rnn.MultiRNNCell(cells)

Robomate avatar Jul 18 '17 12:07 Robomate

Thank you for your answer @Robomate. Did the error stop for you too, @oppasource ?

igormq avatar Jul 27 '17 17:07 igormq

Hi all, I'm so glad I found this post as it is the first practical solution to this problem. However, this particular example fails to train the net properly as the decoded sentence is blank. Did anyone else try this? I'm training my own network on a large data set at the moment, will post the results here later.

nebgru avatar Nov 22 '17 12:11 nebgru

Hi @nebgru , did you solve your problem?

igormq avatar Mar 26 '18 22:03 igormq