问题描述
tensorflow1.0版本中的
tf.contrib.layers.xavier_initializer()
可以替换为tensorflow2.0版本中的
tf.keras.initializers.glorot_normal
(Xavier and Glorot are 2 names for the same initializer algorithm)
编译器相关算法完全相同
if dtype is important for some compatibility reasons - use
如果有兼容性的问题请参考
tf.compat.v1.keras.initializers.glorot_normal
原文链接:
python - change tf.contrib.layers.xavier_initializer() to 2.0.0 - Stack Overflow