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

Method _compare

tensorflow/python/kernel_tests/cwise_ops_test.py:727–735  ·  view source on GitHub ↗
(self, x, y, use_gpu)

Source from the content-addressed store, hash-verified

725class MinMaxOpTest(test.TestCase):
726
727 def _compare(self, x, y, use_gpu):
728 np_min, np_max = np.minimum(x, y), np.maximum(x, y)
729 with test_util.device(use_gpu=use_gpu):
730 inx = ops.convert_to_tensor(x)
731 iny = ops.convert_to_tensor(y)
732 omin, omax = math_ops.minimum(inx, iny), math_ops.maximum(inx, iny)
733 tf_min, tf_max = self.evaluate([omin, omax])
734 self.assertAllEqual(np_min, tf_min)
735 self.assertAllEqual(np_max, tf_max)
736
737 def testBasic(self):
738 x = np.random.rand(1, 3, 2) * 100.

Callers 3

testBasicMethod · 0.95
testDifferentShapesMethod · 0.95
testScalarMethod · 0.95

Calls 5

minimumMethod · 0.80
maximumMethod · 0.80
deviceMethod · 0.45
evaluateMethod · 0.45
assertAllEqualMethod · 0.45

Tested by

no test coverage detected