model.py 文件源码

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

项目:chainer-qrnn 作者: butsugiri 项目源码 文件源码
def convolution(self, xs, train):
        pad = Variable(self.xp.zeros((1, self.in_size), dtype=self.xp.float32), volatile=not train)
        xs_prev = [F.concat([pad, x[:-1,:]], axis=0) for x in xs]
        conv_output = [self.W(x1) + self.V(x2) for x1, x2 in zip(xs_prev, xs)]
        ret = F.transpose_sequence(conv_output)
        return ret
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号