We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd445dc commit 275e22cCopy full SHA for 275e22c
train.py
@@ -171,8 +171,9 @@ def train(opt):
171
# Write validation result into summary
172
if tf is not None:
173
add_summary_value(tf_summary_writer, 'validation loss', val_loss, iteration)
174
- for k,v in lang_stats.items():
175
- add_summary_value(tf_summary_writer, k, v, iteration)
+ if lang_stats is not None:
+ for k,v in lang_stats.items():
176
+ add_summary_value(tf_summary_writer, k, v, iteration)
177
tf_summary_writer.flush()
178
val_result_history[iteration] = {'loss': val_loss, 'lang_stats': lang_stats, 'predictions': predictions}
179
0 commit comments