MCPcopy Create free account
hub / github.com/pytorch/pytorch / testSin

Method testSin

caffe2/python/gradient_check_test.py:284–292  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

282 ]
283
284 def testSin(self):
285 for input_size in self.test_configs:
286 op = core.CreateOperator("Sin", ["X"], ["Y"])
287 X = np.random.rand(*input_size).astype(np.float32) - 0.5
288 res = device_checker.CheckSimple(op, [X], [0])
289 self.assertTrue(res)
290 for checker in gradient_checkers:
291 res, grad, grad_estimated = checker.CheckSimple(op, [X], 0, [0])
292 self.assertTrue(res)
293
294class TestSigmoid(test_util.TestCase):
295

Callers

nothing calls this directly

Calls 3

astypeMethod · 0.80
randMethod · 0.45
CheckSimpleMethod · 0.45

Tested by

no test coverage detected