net.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:convolutional_seq2seq 作者: soskek 项目源码 文件源码
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.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号