add test for slice_one
MODIFY
test/test_ops.py
test/test_ops.py
@@ -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)))

add test for slice_one