diff options
author | Jianwei Xie <xiejw@google.com> | 2017-02-27 12:44:03 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-02-27 13:09:48 -0800 |
commit | 23e99cf11c1be75b48fde2076a738add77cce18c (patch) | |
tree | 699fb4719977f0936b78fa5149a5771316b4be25 /tensorflow/python/training/evaluation_test.py | |
parent | 3fb9948bc5954b7b3de7ed9d1cb41581768f983f (diff) |
Fix assert error in evaluation_test on windows.
Change: 148681573
Diffstat (limited to 'tensorflow/python/training/evaluation_test.py')
-rw-r--r-- | tensorflow/python/training/evaluation_test.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/python/training/evaluation_test.py b/tensorflow/python/training/evaluation_test.py index 98db0370a6..c7ffd8c60b 100644 --- a/tensorflow/python/training/evaluation_test.py +++ b/tensorflow/python/training/evaluation_test.py @@ -88,17 +88,18 @@ class EvaluateOnceTest(test.TestCase): tf_labels = constant_op.constant(self._labels, dtype=dtypes.float32) tf_predictions = logistic_classifier(tf_inputs) - loss = losses.log_loss(labels=tf_labels, predictions=tf_predictions) + loss_op = losses.log_loss(labels=tf_labels, predictions=tf_predictions) optimizer = gradient_descent.GradientDescentOptimizer(learning_rate=1.0) - train_op = optimizer.minimize(loss, training.get_or_create_global_step()) + train_op = optimizer.minimize(loss_op, + training.get_or_create_global_step()) with monitored_session.MonitoredTrainingSession( checkpoint_dir=checkpoint_dir, hooks=[basic_session_run_hooks.StopAtStepHook(num_steps)]) as session: loss = None while not session.should_stop(): - loss = session.run(train_op) + _, loss = session.run([train_op, loss_op]) if num_steps >= 300: assert loss < .015 |