deepke/example/ae/standard/conf/model/capsule.yaml

20 lines
816 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

model_name: capsule
share_weights: True
num_iterations: 5 # 迭代次数
dropout: 0.3
input_dim_capsule: ??? # 由上层卷积结果得到,一般是卷积输出的 hidden_size
dim_capsule: 50 # 输出 capsule 的维度
num_capsule: ??? # 输出 capsule 的数目,和分类结果相同, == num_attributes
# primary capsule 组成
# 可以 embedding / cnn / rnn
# 暂时先用 cnn
in_channels: ??? # 使用 embedding 输出的结果,不需要指定
out_channels: 100 # == input_dim_capsule
kernel_sizes: [9] # 必须为奇数,而且要比较大
activation: 'lrelu' # [relu, lrelu, prelu, selu, celu, gelu, sigmoid, tanh]
keep_length: False # 不需要padding太多无用信息
pooling_strategy: cls # 无关紧要,根本用不到