tools.py 文件源码

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

项目:cortex 作者: rdevon 项目源码 文件源码
def init_weights(model, weight_noise=False, weight_scale=0.001, dropout=False,
                 **kwargs):
    '''Inialization function for weights.

    Args:
        model (Layer).
        weight_noise (bool): noise the weights.
        weight_scale (float): scale for weight initialization.
        dropout (bool): use dropout.
        **kwargs: extra kwargs.

    Returns:
        dict: extra kwargs.

    '''
    model.weight_noise = weight_noise
    model.weight_scale = weight_scale
    model.dropout = dropout
    return kwargs
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号