Skip to content

Commit

Permalink
Relax tolerance on value checking
Browse files Browse the repository at this point in the history
Windows produces slightly different results, relax tolerance on matching
  • Loading branch information
sivonxay committed Nov 2, 2023
1 parent b9517da commit fccadf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/machine_learning/modules/test_layer_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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():
Expand All @@ -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)

0 comments on commit fccadf3

Please sign in to comment.