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

function create_variables in resnet.py #19

Open
Nina-9519 opened this issue Mar 6, 2018 · 1 comment
Open

function create_variables in resnet.py #19

Nina-9519 opened this issue Mar 6, 2018 · 1 comment

Comments

@Nina-9519
Copy link


def create_variables(name, shape, initializer=tf.contrib.layers.xavier_initializer(), is_fc_layer=False):
if is_fc_layer is True:
regularizer = tf.contrib.layers.l2_regularizer(scale=FLAGS.weight_decay)
else:
regularizer = tf.contrib.layers.l2_regularizer(scale=FLAGS.weight_decay)

new_variables = tf.get_variable(name, shape=shape, initializer=initializer,
                                regularizer=regularizer)
return new_variables

These two lines, the same?

@wenxinxu
Copy link
Owner

Ah thanks for pointing out! I intended to use different weight--decay for fc layers.

Changed now.

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

2 participants