mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
add test for slice_one
This commit is contained in:
parent
d10dd175f4
commit
93c378dffc
1 changed files with 3 additions and 0 deletions
|
|
@ -148,6 +148,9 @@ class TestOps(unittest.TestCase):
|
|||
helper_test_op([(3,3,3,3)], lambda x: x[1:2, 1:2], lambda x: x[1:2, 1:2])
|
||||
helper_test_op([(3,3,3,3)], lambda x: x[1:2, 1:2, 0:-1], lambda x: x[1:2, 1:2, 0:-1])
|
||||
|
||||
def test_slice_one(self):
|
||||
helper_test_op([(3)], lambda x: x[1], lambda x: x[1])
|
||||
|
||||
def test_pad2d(self):
|
||||
helper_test_op([(3,3,3,3)], lambda x: torch.nn.functional.pad(x, (1,2,3,4)), lambda x: x.pad2d(padding=(1,2,3,4)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue