net.py 文件源码

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

项目:NlpUtil 作者: trtd56 项目源码 文件源码
def __call__(self, x, train=True):
        h_x = self.embed(x)
        h_x = [h for h in h_x]
        self.nstep_lstm.reset_state()
        h_x = self.nstep_lstm(h_x, train)
        h_x = [h[-1] for h in h_x]
        h_x = F.stack(h_x, 0)
        return self.l1(F.dropout(h_x, train=train))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号