1.Tensorflow2.0 中 tf.keras.layers.Conv2D 里的初始化方法 'glorot_uniform'
https://blog.csdn.net/qq_36758914/article/details/105315547
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.
假设输入网络的一个 28281 的数据,卷积核形状为 3*3,卷积核通道数有 32 个(即输出的通道数有 32 个),那么此时 limit 为:
l i m i t = s q r t ( 6/( 3 × 3 × 1 + 3 × 3 × 32 ))
Keras.dll!Keras.Layers.Dense.Dense(int units, int? input_dim, string activation, bool use_bias, Keras.StringOrInstance kernel_initializer, string bias_initializer, Keras.StringOrInstance kernel_regularizer, string bias_regularizer, string activity_regularizer, string kernel_constraint, string bias_constraint, Keras.Shape input_shape) Line 68 C#
Keras.UnitTest.dll!Keras.UnitTest.Keras_Layers_Core.Dense_CustomKRegularizerAndKInitParams() Line 31 C#