conflict between code and doc in model.py
youkaichao opened this issue · 0 comments
youkaichao commented
I'm confused. In model.py, function _variable_with_weight_decay, the doc says
Note that the Variable is initialized with a truncated normal distribution.
and the code is
var = _variable_on_cpu(name, shape,initializer=tf.contrib.layers.xavier_initializer())
but in offical doc of tensorflow https://www.tensorflow.org/api_docs/python/tf/contrib/layers/xavier_initializer
the function prototype is
xavier_initializer(
uniform=True,
seed=None,
dtype=tf.float32
)
and the doc syas
uniform: Whether to use uniform or normal distributed random initialization.
So, xavier_initializer uses uniform distrubution by default.