From 876c49792ae7ec2f8680220f8d5e5c38172391c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kopa=C5=84ko?= Date: Sat, 10 Mar 2018 15:58:51 +0100 Subject: [PATCH 1/2] unnecessary variable assignment in loop --- samples/core/get_started/premade_estimator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/core/get_started/premade_estimator.py b/samples/core/get_started/premade_estimator.py index 6b771ea3fcd..815d80e4dd7 100644 --- a/samples/core/get_started/premade_estimator.py +++ b/samples/core/get_started/premade_estimator.py @@ -73,8 +73,9 @@ def main(argv): labels=None, batch_size=args.batch_size)) + template = ('\nPrediction is "{}" ({:.1f}%), expected "{}"') + for pred_dict, expec in zip(predictions, expected): - template = ('\nPrediction is "{}" ({:.1f}%), expected "{}"') class_id = pred_dict['class_ids'][0] probability = pred_dict['probabilities'][class_id] From 080795fecb72a68c1ab788e1a6f277641855bad0 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Sun, 11 Mar 2018 20:39:34 -0700 Subject: [PATCH 2/2] Remove unnecessary blank line --- samples/core/get_started/premade_estimator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/core/get_started/premade_estimator.py b/samples/core/get_started/premade_estimator.py index 815d80e4dd7..c4d21ad2015 100644 --- a/samples/core/get_started/premade_estimator.py +++ b/samples/core/get_started/premade_estimator.py @@ -76,7 +76,6 @@ def main(argv): 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]