weight_init.py 文件源码

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

项目:generative_models 作者: j-min 项目源码 文件源码
def init_weights(net, init_type='normal'):
    print('initialization method [%s]' % init_type)
    if init_type == 'normal':
        net.apply(weights_init_normal)
    elif init_type == 'xavier':
        net.apply(weights_init_xavier)
    elif init_type == 'kaiming':
        net.apply(weights_init_kaiming)
    elif init_type == 'orthogonal':
        net.apply(weights_init_orthogonal)
    else:
        raise NotImplementedError('initialization method [%s] is not implemented' % init_type)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号