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'.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
From the documentation:
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.
The glorot_uniform_initializer
function initializes values from a uniform distribution.
This function is documented as:
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