We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
实际上 Text-cnn在训练的时候 卷积层可以使用 多个 不同尺寸的卷积核 最后拼接到一个中间层上 然后输入多个 dense 可以尝试如下操作
# 第一卷积层 conv_4_layer = Convolution1D(200, 4, activation='tanh')(embedding) # 第一池化层 max_pool_4_layer = MaxPooling1D(4)(conv_4_layer) # 第一扁平层 flat_4_layer = Flatten()(max_pool_4_layer) # 第二卷积层 conv_5_layer = Convolution1D(200, 5, activation='tanh')(embedding) # 第二池化层 max_pool_5_layer = MaxPooling1D(5)(conv_5_layer) # 第二扁平层 flat_5_layer = Flatten()(max_pool_5_layer) # 第三卷积层 conv_6_layer = Convolution1D(200, 6, activation='tanh')(embedding) # 第三池化层 max_pool_6_layer = MaxPooling1D(6)(conv_6_layer) # 第三扁平层 flat_6_layer = Flatten()(max_pool_6_layer) # 组合 CNNs = concatenate([flat_4_layer, flat_5_layer, flat_6_layer])
The text was updated successfully, but these errors were encountered:
嗯,是的,用不同的卷积核,效果更好些。我有点偷懒,没有更新,后续有空更新,谢谢你的建议。
Sorry, something went wrong.
No branches or pull requests
实际上 Text-cnn在训练的时候 卷积层可以使用 多个 不同尺寸的卷积核 最后拼接到一个中间层上 然后输入多个 dense 可以尝试如下操作
The text was updated successfully, but these errors were encountered: