Save flag values next to checkpoints
This commit is contained in:
parent
935ede3f28
commit
ba2d29b36f
@ -471,6 +471,11 @@ def train():
|
||||
best_dev_path = os.path.join(FLAGS.checkpoint_dir, 'best_dev')
|
||||
best_dev_filename = 'best_dev_checkpoint'
|
||||
|
||||
# Save flags next to checkpoints
|
||||
flags_file = os.path.join(FLAGS.checkpoint_dir, 'flags.txt')
|
||||
with open(flags_file, 'w') as fout:
|
||||
fout.write(FLAGS.flags_into_string())
|
||||
|
||||
initializer = tfv1.global_variables_initializer()
|
||||
|
||||
with tfv1.Session(config=Config.session_config) as session:
|
||||
|
Loading…
Reference in New Issue
Block a user