robmsmt / KerasDeepSpeech

A Keras CTC implementation of Baidu's DeepSpeech for model experimentation
GNU Affero General Public License v3.0
242 stars 79 forks source link

Input dimension mismatch error on training the model ds1 dropout #6

Closed romass12 closed 6 years ago

romass12 commented 6 years ago

This is the error on running model.fit_generator with Keras(2.0.9) ,Theano(0.9.0) as backend and python version 3

ValueError: Input dimension mis-match. (input[0].shape[1] = 1, input[1].shape[1] = 16) Apply node that caused the error: Elemwise{eq,no_inplace}(training/ctc_target, Elemwise{round_half_to_even,no_inplace}.0) Toposort index: 762 Inputs types: [TensorType(float64, matrix), TensorType(float64, row)] Inputs shapes: [(16, 1), (1, 16)] Inputs strides: [(8, 8), (128, 8)] Inputs values: ['not shown', 'not shown'] Outputs clients: [[Sum{acc_dtype=int64}(Elemwise{eq,no_inplace}.0)]]

robmsmt commented 6 years ago

I have not tested it with Theano. If you can't try TensorFlow for whatever reason, I believe that the input dimension ordering for Theano is different so would need to be swapped. See https://datascience.stackexchange.com/questions/14467/what-does-theano-dimension-ordering-mean

If you get it to work please raise a PR!

Rob