From eba4b9ff1eb8b88b38a32689155eff5c267cf6e9 Mon Sep 17 00:00:00 2001 From: Joppe Geluykens Date: Thu, 13 Sep 2018 00:21:39 +0200 Subject: [PATCH] Add comment clarifying items in `predictions` list This way, it becomes clear what the result of the `print()` call will look like. --- .../distribute/python/examples/simple_estimator_example.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tensorflow/contrib/distribute/python/examples/simple_estimator_example.py b/tensorflow/contrib/distribute/python/examples/simple_estimator_example.py index 3f1dae332ff..e48d09a0a95 100644 --- a/tensorflow/contrib/distribute/python/examples/simple_estimator_example.py +++ b/tensorflow/contrib/distribute/python/examples/simple_estimator_example.py @@ -79,6 +79,8 @@ def main(_): return predict_features prediction_iterable = estimator.predict(input_fn=predict_input_fn) + # Create a list containing each of the prediction dictionaries that map + # the key 'logits' to an array of model outputs. predictions = [prediction_iterable.next() for _ in range(10)] print("Prediction results: {}".format(predictions))