Torch
recursive_assert_approx_equal(x, y, atol=0.0001, rtol=0.0001)
Assert that all tensors in a nested structure are approximately equal.
Source code in bionemo/testing/torch.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
recursive_detach(x)
Detach all tensors in a nested structure.
Source code in bionemo/testing/torch.py
21 22 23 24 25 26 27 28 29 30 |
|