Skip to content

Commit

Permalink
fix occasionally bug in vel_mag, pytorch version
Browse files Browse the repository at this point in the history
  • Loading branch information
enigne committed Nov 11, 2024
1 parent 9e7711f commit 5f4d6c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_pde.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def op(i,o):
vel = experiment.model.predict(experiment.model_data.X['u'], operator=op)
assert np.all(vel >=0)
assert vel.shape == (10,1)
assert np.all(vel.flatten() == vel_sol.flatten())
assert np.all(vel.flatten() - vel_sol.flatten() < 2.0*np.finfo(float).eps)

@pytest.mark.skipif(backend_name=="jax", reason="jacobian function implemented for jax uses different syntax, skip from test for now")
def test_user_defined_grad():
Expand Down

0 comments on commit 5f4d6c2

Please sign in to comment.