From fccadf38c52bf891f2bd2624b215bcc02a24d56b Mon Sep 17 00:00:00 2001 From: Eric Sivonxay Date: Thu, 2 Nov 2023 15:45:07 -0700 Subject: [PATCH] Relax tolerance on value checking Windows produces slightly different results, relax tolerance on matching --- tests/machine_learning/modules/test_layer_interaction.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/machine_learning/modules/test_layer_interaction.py b/tests/machine_learning/modules/test_layer_interaction.py index 9e243ed..7b496ca 100644 --- a/tests/machine_learning/modules/test_layer_interaction.py +++ b/tests/machine_learning/modules/test_layer_interaction.py @@ -17,7 +17,7 @@ def test_interaction_block(): [3.0760e+07, 1.2517e+09, 2.4119e+09], [1.6136e+08, 8.4677e+09, 1.6704e+10], [3.0760e+07, 1.2517e+09, 2.4119e+09]]) - assert torch.allclose(out, expected_out, rtol=1e-3) + assert torch.allclose(out, expected_out, rtol=1e-2) def test_interaction_conv(): @@ -46,7 +46,7 @@ def test_integrated_gaussian_interaction_tanh(): [1.0076e+08, 1.7178e+08, -9.0918e+10], [2.9631e+08, 1.0277e+09, -1.4463e+11], [1.0076e+08, 1.7178e+08, -9.0918e+10]]) - assert torch.allclose(out, expected_out, rtol=1e-3) + assert torch.allclose(out, expected_out, rtol=1e-2) def test_integrated_gaussian_interaction(): @@ -61,4 +61,4 @@ def test_integrated_gaussian_interaction(): [7.1898e+07, 2.1867e+08, 2.4119e+09], [3.5350e+08, 1.1697e+09, 1.6704e+10], [7.1898e+07, 2.1867e+08, 2.4119e+09]]) - assert torch.allclose(out, expected_out, rtol=1e-3) + assert torch.allclose(out, expected_out, rtol=1e-2)