Tensorflow 中的默认变量初始值设定项是什么?
What is the default variable initializer in Tensorflow?
当调用 tf.get_variable()
时没有任何初始化程序指定,默认使用的变量初始化方法是什么?文档只是说 'None'.
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.
glorot_uniform_initializer
函数初始化均匀分布的值。
此函数documented为:
The Glorot uniform initializer, also called Xavier uniform initializer.
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.
Reference: http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf
当调用 tf.get_variable()
时没有任何初始化程序指定,默认使用的变量初始化方法是什么?文档只是说 'None'.
If initializer is
None
(the default), the default initializer passed in the variable scope will be used. If that one isNone
too, aglorot_uniform_initializer
will be used.
glorot_uniform_initializer
函数初始化均匀分布的值。
此函数documented为:
The Glorot uniform initializer, also called Xavier uniform initializer.
It draws samples from a uniform distribution within [-limit, limit],
wherelimit
issqrt(6 / (fan_in + fan_out))
wherefan_in
is the number of input units in the weight tensor
andfan_out
is the number of output units in the weight tensor.Reference: http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf