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

Only 1 conv layer where supposed to be many #8

Open KostyaMoonlight opened 6 years ago

KostyaMoonlight commented 6 years ago

At model.py at line 241 you have code like: if use_conv: conv = ZeroPadding1D(padding=(0, 2048))(x) for l in range(conv_layers): x = Conv1D(filters=fcsize, name='conv{}'.format(l+1), kernel_size=11, padding='valid', activation='relu', strides=2)(conv)

There must be something like: if use_conv: conv = ZeroPadding1D(padding=(0, 2048))(x) x = Conv1D(filters=fcsize, name='conv{}'.format(1), kernel_size=11, padding='valid', activation='relu', strides=2)(conv) for l in range(1, conv_layers): x = Conv1D(filters=fcsize, name='conv{}'.format(l+1), kernel_size=11, padding='valid', activation='relu', strides=2)(x)

mrqorib commented 6 years ago

@KostyaMoonlight Why do you think that way? I don't see any difference between the code at the top and the bottom, other than the bottom one ensure that there's at least one layer of convolution layer if the user set the conv_layers = 0.

revive commented 6 years ago

@mrqorib Please note the for loop in the top, the x layer is re-defined from the Conv1D operation on the same conv layer.