gpt4 book ai didi

python - Tensorflow 中的默认变量初始值设定项是什么?

转载 作者:太空狗 更新时间:2023-10-29 17:46:30 28 4
gpt4 key购买 nike

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

最佳答案

From the documentation :

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

关于python - Tensorflow 中的默认变量初始值设定项是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37350131/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com