increase tol

This commit is contained in:
hiyouga 2024-06-16 01:21:06 +08:00
parent 8c1046d78a
commit de43bee0b0
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ def compare_model(model_a: "torch.nn.Module", model_b: "torch.nn.Module"):
state_dict_b = model_b.state_dict()
assert set(state_dict_a.keys()) == set(state_dict_b.keys())
for name in state_dict_a.keys():
assert torch.allclose(state_dict_a[name], state_dict_b[name])
assert torch.allclose(state_dict_a[name], state_dict_b[name], rtol=1e-3, atol=1e-3)
def test_pissa_init():