model.py 文件源码

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

项目:pytorch-skipthoughts 作者: kaniblu 项目源码 文件源码
def init_gru(cell, gain=1):
    cell.reset_parameters()

    # orthogonal initialization of recurrent weights
    for _, hh, _, _ in cell.all_weights:
        for i in range(0, hh.size(0), cell.hidden_size):
            I.orthogonal(hh[i:i + cell.hidden_size], gain=gain)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号