Currently, I am tuning my model by testing the Kernel size.
I have the following code
:
x = embedding_layer(input_4)
x = Conv1D(FILTERS, KERNEL, activation='relu')(x)
x = Dropout(DROPOUT)(x)
x = Conv1D(FILTERS, KERNEL, activation='relu')(x)
x = Dropout(DROPOUT)(x)
x = Conv1D(FILTERS, KERNEL, activation='relu')(x)
x = Dropout(DROPOUT)(x)
x = Conv1D(FILTERS, KERNEL, activation='relu')(x)
x = Dropout(DROPOUT)(x)
x = Conv1D(FILTERS, KERNEL, activation='relu')(x)
x = Dropout(DROPOUT)(x)
x = MaxPooling1D(3)(x)
x = Conv1D(FILTERS, KERNEL, activation='relu')(x)
x = Dropout(DROPOUT)(x)
x = Conv1D(FILTERS, KERNEL, activation='relu')(x)
x = Dropout(DROPOUT)(x)
x = Conv1D(FILTERS, KERNEL, activation='relu')(x)
x = Dropout(DROPOUT)(x)
x = Conv1D(FILTERS, KERNEL, activation='relu')(x)
x = Dropout(DROPOUT)(x)
x = Conv1D(FILTERS, KERNEL, activation='relu')(x)
x = Dropout(DROPOUT)(x)
x = MaxPooling1D(3)(x)
When the Kernel is 2
or 3
, the network runs fine, but from 4
onwards it runs into an error about the dimensionality. I suspect that it has to do with the stride length. However, the Keras
website (https://keras.io/layers/convolutional/) does not say what the default stride length is.
My question now is: what is default stride length in Keras' Conv1D? And what would be a good stride length for a kernel size of 4
and for a kernel size of 5
?