igormq / ctc_tensorflow_example

CTC + Tensorflow Example for ASR
MIT License
313 stars 183 forks source link

Multilayer problem #15

Open oppasource opened 7 years ago

oppasource commented 7 years ago

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

Robomate commented 7 years ago

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

Robomate commented 7 years ago

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)
igormq commented 7 years ago

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

nebgru commented 6 years ago

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.

igormq commented 6 years ago

Hi @nebgru , did you solve your problem?