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

Method compare

tensorflow/python/kernel_tests/trace_op_test.py:32–36  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

30 x = np.random.seed(0)
31
32 def compare(self, x):
33 np_ans = np.trace(x, axis1=-2, axis2=-1)
34 with self.cached_session(use_gpu=True):
35 tf_ans = math_ops.trace(x).eval()
36 self.assertAllClose(tf_ans, np_ans)
37
38 @test_util.run_deprecated_v1
39 def testTrace(self):

Callers 3

testTraceMethod · 0.95
RemoveNodesFunction · 0.45
SameNamedtuplesFunction · 0.45

Calls 4

traceMethod · 0.45
cached_sessionMethod · 0.45
evalMethod · 0.45
assertAllCloseMethod · 0.45

Tested by

no test coverage detected