Tensorflow 中的默认变量初始化器是什么? [英] What is the default variable initializer in Tensorflow?

查看:15
本文介绍了Tensorflow 中的默认变量初始化器是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tf.get_variable() 在没有任何初始化器规范的情况下调用时使用的默认变量初始化方法是什么?文档只是说无".

What is the default method of variable initialization used when tf.get_variable() is called without any specification for the initializer? The Docs just says 'None'.

推荐答案

来自文档:

如果初始化器是None(默认),则将使用在变量作用域中传递的默认初始化器.如果那个也是 None,则将使用 glorot_uniform_initializer.

If initializer is None (the default), the default initializer passed in the variable scope will be used. If that one is None too, a glorot_uniform_initializer will be used.

_initializeglorot> 函数从均匀分布中初始化值.

The glorot_uniform_initializer function initializes values from a uniform distribution.

这个函数被记录为:

Glorot 统一初始化器,也称为 Xavier 统一初始化器.

The Glorot uniform initializer, also called Xavier uniform initializer.

它从 [-limit, limit] 内的均匀分布中抽取样本,
其中 limitsqrt(6/(fan_in + fan_out))
其中 fan_in 是权重张量中的输入单元数
fan_out 是权重张量中输出单元的数量.

It draws samples from a uniform distribution within [-limit, limit],
where limit is sqrt(6 / (fan_in + fan_out))
where fan_in is the number of input units in the weight tensor
and fan_out is the number of output units in the weight tensor.

参考:http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf

这篇关于Tensorflow 中的默认变量初始化器是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆