Commit 5a209dbd authored by Yuxin Wu's avatar Yuxin Wu

still use `tf.get_variable` because `tf.Variable` sometimes takes name_scope...

still use `tf.get_variable` because `tf.Variable` sometimes takes name_scope rather than variable_scope
parent a871c622
......@@ -76,7 +76,7 @@ class Model(ModelDesc):
return tf.add_n([cost, wd_cost], name='cost')
def optimizer(self):
lr = tf.Variable(1e-2, name='learning_rate', trainable=False)
lr = tf.get_variable('learning_rate', initializer=1e-2, trainable=False)
tf.summary.scalar('lr', lr)
return tf.train.AdamOptimizer(lr, epsilon=1e-3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment