【发布时间】:2019-01-03 15:54:22
【问题描述】:
目前,我正在通过测试内核大小来调整我的模型。
我有以下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)
当内核为2 或3 时,网络运行良好,但从4 开始,它会遇到有关维度的错误。我怀疑这与步幅有关。但是,Keras 网站 (https://keras.io/layers/convolutional/) 并没有说明默认步幅是多少。
我现在的问题是:Keras 的 Conv1D 中的默认步幅长度是多少?对于4 的内核大小和5 的内核大小,什么是好的步长?
【问题讨论】:
标签: keras conv-neural-network stride