Open icecity96 opened 5 years ago
In function model_fn:
model_fn
if init_checkpoint: (assignment_map, initialized_variable_names) = modeling.get_assignment_map_from_checkpoint(tvars,init_checkpoint) tf.train.init_from_checkpoint(init_checkpoint, assignment_map) if use_tpu: def tpu_scaffold(): tf.train.init_from_checkpoint(init_checkpoint, assignment_map) return tf.train.Scaffold() scaffold_fn = tpu_scaffold else: tf.train.init_from_checkpoint(init_checkpoint, assignment_map)
why tf.train.init_from_checkpoint should run twice?
tf.train.init_from_checkpoint
The first init op can be omitted. I think the author leave it incautiously.
In function
model_fn
:why
tf.train.init_from_checkpoint
should run twice?