关于embedding网络层的相关英文api说明文档
embedding网络层的相关英文api说明
截取对于mask_zero的说明内容
mask_zero: Boolean, whether or not the input value 0 is a special "padding" value that should be masked out.
This is useful when using recurrent layers which may take variable length input.
If this is True, then all subsequent layers in the model need to support masking or an exception will be raised.
If mask_zero is set to True, as a consequence, index 0 cannot be used in the vocabulary (input_dim should equal size of vocabulary + 1).
对应的翻译内容如下:
mask_zero:Boolean值,判断是否输入value0时一个特殊的"padding"值需要被遮盖。
这将会非常有用当使用循环网络层,这个网络层可能会得到变量长度的输入。
如果定义为True,所有随后在模型中的网络层需要支持遮盖否则会抛出异常。
如果mask_zero被设置为True,结果是索引0不能被在词汇表中使用(输入维度应该与词汇表+1的大小等同)