def __call__(self, x, mask=None):
x = F.dropout(x, ratio=self.dropout)
out, pregate = F.split_axis(self.conv(x), 2, axis=1)
out = out * F.sigmoid(pregate)
if mask is not None:
out *= mask
return out
# TODO: For layers whose output is not directly fed to a gated linear
# unit, we initialize weights from N (0, p 1/nl) where nl is the number of
# input connections for each neuron.
评论列表
文章目录