Skip to content

Commit e0708aa

Browse files
Kade LinKade Lin
authored andcommitted
Update test
1 parent bfe63df commit e0708aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_nn.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ def test_max(t: Tensor) -> None:
3838
expected_max = max([t[i, j, k] for k in range(t.shape[2])])
3939
assert_close(out[i, j, 0], expected_max)
4040

41+
42+
@given(tensors(shape=(2, 3, 4)))
43+
def test_max_backward(t: Tensor) -> None:
4144
t.requires_grad_(True)
4245
t.zero_grad_()
4346
out = minitorch.max(t, dim=2)

0 commit comments

Comments
 (0)