From bc4609143ea4429e5b0f951dfc8ae2d5cd6a3b09 Mon Sep 17 00:00:00 2001 From: Garrett Smith Date: Wed, 21 Nov 2018 12:31:12 -0600 Subject: [PATCH] Mark global_step_init as used to prevent spurious warning msg Without this, TF displays a warning message that looks like an error (contains traceback): ``` E1121 12:34:00.888499 139860141586240 tf_logging.py:105] ================================== Object was never used (type ): If you want to mark it as used call its "mark_used()" method. It was originally created here: ... ``` This behavior occurs on TF 1.12.0 but reports suggest that these warnings started appearing as early as TF 1.2.0. --- evaluate_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/evaluate_model.py b/evaluate_model.py index e08a5d7..af3f57a 100644 --- a/evaluate_model.py +++ b/evaluate_model.py @@ -198,6 +198,7 @@ def evaluate(hps, result_dir, tuner=None, trial_name=None): consistency_model=FLAGS.consistency_model, zca_input_file_path=FLAGS.zca_input_file_path, ) + ssl_framework.global_step_init.mark_used() new_saver = tf.train.Saver(tf.global_variables()) # We need a new session for each checkpoint