Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conflict between code and doc in model.py #6

Open
youkaichao opened this issue Jul 21, 2017 · 0 comments
Open

conflict between code and doc in model.py #6

youkaichao opened this issue Jul 21, 2017 · 0 comments

Comments

@youkaichao
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant