Commit f12517e5 authored by Yuxin Wu's avatar Yuxin Wu

no initializer for global_step, to be backward-compatible

parent 9995c69e
...@@ -46,7 +46,7 @@ def get_global_step_var(): ...@@ -46,7 +46,7 @@ def get_global_step_var():
assert scope.name == '', \ assert scope.name == '', \
"Creating global_step_var under a variable scope would cause problems!" "Creating global_step_var under a variable scope would cause problems!"
var = tf.get_variable(GLOBAL_STEP_OP_NAME, shape=[], var = tf.get_variable(GLOBAL_STEP_OP_NAME, shape=[],
initializer=tf.constant_initializer(value=0, dtype=tf.int32), #initializer=tf.constant_initializer(value=0, dtype=tf.int32),
trainable=False, dtype=tf.int32) trainable=False, dtype=tf.int32)
return var return var
......
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