WeiTang114 / MVCNN-TensorFlow

An Multi-View CNN (MVCNN) implementation with TensorFlow.
MIT License
120 stars 67 forks source link

conflict between code and doc in model.py #6

Open youkaichao opened 7 years ago

youkaichao commented 7 years ago

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.