embedding网络层之中的mask_zero参数解析

关于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的大小等同)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值