From 5f4608ac3af78f17dc86b79054a7c2ecb1830318 Mon Sep 17 00:00:00 2001 From: NihalHarish Date: Mon, 3 Aug 2020 21:12:49 -0700 Subject: [PATCH] modify asserts --- tests/tensorflow2/test_estimator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tensorflow2/test_estimator.py b/tests/tensorflow2/test_estimator.py index c0ee14283..92f8d732e 100644 --- a/tests/tensorflow2/test_estimator.py +++ b/tests/tensorflow2/test_estimator.py @@ -36,7 +36,7 @@ def test_estimator(out_dir, tf_eager_mode, saveall): # vanilla TF 2.2: all = 300, loss = 1, weights = 4, gradients = 0, biases = 18, optimizer variables = 0, metrics = 0, others = 277 # AWS-TF 2.2 : all = 300, loss = 1, weights = 4, gradients = 8, biases = 18, optimizer variables = 0, metrics = 0, others = 269 # AWS-TF 2.1 : all = 309, loss = 1, weights = 4, gradients = 8, biases = 18, optimizer variables = 0, metrics = 0, others = 278 - assert len(tnames) >= 300 + assert len(tnames) >= 1 + 4 + 18 assert len(trial.tensor_names(collection=CollectionKeys.LOSSES)) == 1 assert len(trial.tensor_names(collection=CollectionKeys.WEIGHTS)) == 4 assert len(trial.tensor_names(collection=CollectionKeys.BIASES)) == 18 @@ -71,7 +71,7 @@ def test_linear_classifier(out_dir, tf_eager_mode, saveall): # vanilla TF 2.2: all = 214, loss = 2, weights = 1, gradients = 0, biases = 12, optimizer variables = 0, metrics = 0, others = 199 # AWS-TF 2.2: all = 219, loss = 2, weights = 1, gradients = 2, biases = 12, optimizer variables = 5, metrics = 0, others = 197 # AWS-TF 2.1: all = 226, loss = 2, weights = 1, gradients = 2, biases = 12, optimizer variables = 5, metrics = 0, others = 204 - assert len(tnames) >= 214 + assert len(tnames) >= 2 + 1 + 12 assert len(trial.tensor_names(collection=CollectionKeys.LOSSES)) == 2 assert len(trial.tensor_names(collection=CollectionKeys.WEIGHTS)) == 1 assert len(trial.tensor_names(collection=CollectionKeys.BIASES)) == 12