KerasDeepSpeech
KerasDeepSpeech copied to clipboard
Only 1 conv layer where supposed to be many
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=fc_size, 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=fc_size, name='conv_{}'.format(1), kernel_size=11, padding='valid', activation='relu', strides=2)(conv) for l in range(1, conv_layers): x = Conv1D(filters=fc_size, name='conv_{}'.format(l+1), kernel_size=11, padding='valid', activation='relu', strides=2)(x)
@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.
@mrqorib Please note the for
loop in the top, the x
layer is re-defined from the Conv1D
operation on the same conv
layer.