(self)
| 198 | ] |
| 199 | |
| 200 | def testTanh(self): |
| 201 | for input_size in self.test_configs: |
| 202 | op = core.CreateOperator("Tanh", ["X"], ["Y"]) |
| 203 | X = np.random.rand(*input_size).astype(np.float32) - 0.5 |
| 204 | res = device_checker.CheckSimple(op, [X], [0]) |
| 205 | self.assertTrue(res) |
| 206 | for checker in gradient_checkers: |
| 207 | res, grad, grad_estimated = checker.CheckSimple(op, [X], 0, [0]) |
| 208 | self.assertTrue(res) |
| 209 | |
| 210 | |
| 211 | class TestAbs(test_util.TestCase): |
nothing calls this directly
no test coverage detected