fastNLP.modules.dropout module

undocumented

class fastNLP.modules.dropout.TimestepDropout(p: float = 0.5, inplace: bool = False)[源代码]

基类:torch.nn.modules.dropout.Dropout

传入参数的shape为 (batch_size, num_timesteps, embedding_dim) 使用同一个shape为 (batch_size, embedding_dim) 的mask在每个timestamp上做dropout。

p: float
inplace: bool