initialize_local_variables is not included in initialize_all_variables. If you remove the num_epochs argument, your graph shouldn't have any local variables, which should be why it works in this case. If you are really running initialize_local_variables, then something else seems to be going on.
init_op = tf.group(tf.global_variables_initializer(), tf.local_variables_initializer())
sess.run(init_op)
ref:
网友评论