variational_rnn.py 文件源码

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

项目:NeuroNLP2 作者: XuezheMax 项目源码 文件源码
def VarRNNTanhCell(input, hidden, w_ih, w_hh, b_ih=None, b_hh=None, noise_in=None, noise_hidden=None):
    if noise_in is not None:
        input = input * noise_in
    if noise_hidden is not None:
        hidden = hidden * noise_hidden
    hy = F.tanh(F.linear(input, w_ih, b_ih) + F.linear(hidden, w_hh, b_hh))
    return hy
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号