propagate fix from tensorflow/models#3561
authorMark Daoust <markdaoust@google.com>
Mon, 12 Mar 2018 04:23:15 +0000 (21:23 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 12 Mar 2018 04:27:48 +0000 (21:27 -0700)
PiperOrigin-RevId: 188675327

tensorflow/docs_src/get_started/premade_estimators.md

index 6bffd2e..e50d2f5 100644 (file)
@@ -397,9 +397,9 @@ predictions and their probabilities:
 
 
 ``` python
-for pred_dict, expec in zip(predictions, expected):
-    template = ('\nPrediction is "{}" ({:.1f}%), expected "{}"')
+template = ('\nPrediction is "{}" ({:.1f}%), expected "{}"')
 
+for pred_dict, expec in zip(predictions, expected):
     class_id = pred_dict['class_ids'][0]
     probability = pred_dict['probabilities'][class_id]