mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-07 03:00:26 -04:00
add failed Tensor.pow test cases (#3334)
tried refactoring pow and found some bugs
This commit is contained in:
@@ -383,6 +383,10 @@ class TestOps(unittest.TestCase):
|
||||
helper_test_op([(45,65)], lambda x: 2.0**x)
|
||||
helper_test_op([()], lambda x: x**2.0)
|
||||
helper_test_op([()], lambda x: 2.0**x)
|
||||
# TODO: fix 0**x and 0**0 == 1
|
||||
# helper_test_op(None, lambda x: 0**x, vals=[[-2.,-1,0,1,2,3]])
|
||||
# TODO: fix backward, should be nan
|
||||
helper_test_op(None, lambda x: (-2)**x, vals=[[-2.,-1,0,1,2,3]], forward_only=True)
|
||||
|
||||
def test_sqrt(self):
|
||||
helper_test_op([(45,65)], lambda x: x.sqrt())
|
||||
|
||||
Reference in New Issue
Block a user