MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _testGelu

Method _testGelu

tensorflow/python/kernel_tests/gelu_op_test.py:41–45  ·  view source on GitHub ↗
(self, np_features, approximate=False, use_gpu=False)

Source from the content-addressed store, hash-verified

39 return x * norm.cdf(x)
40
41 def _testGelu(self, np_features, approximate=False, use_gpu=False):
42 expected_values = self._npGelu(np_features, approximate)
43 with self.cached_session(use_gpu=use_gpu):
44 results = self.evaluate(nn_ops.gelu(np_features, approximate))
45 self.assertAllCloseAccordingToType(expected_values, results)
46
47 def testNumbers(self):
48 for approximate in [False, True]:

Callers 1

testNumbersMethod · 0.95

Calls 5

_npGeluMethod · 0.95
cached_sessionMethod · 0.45
evaluateMethod · 0.45
geluMethod · 0.45

Tested by

no test coverage detected