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

Method _testLargeSort

tensorflow/python/kernel_tests/topk_op_test.py:115–122  ·  view source on GitHub ↗
(self, dtype)

Source from the content-addressed store, hash-verified

113 self._validateTopK(inputs, 1, [[np.NaN], [np.NaN]], [[0], [0]])
114
115 def _testLargeSort(self, dtype):
116 b = 10
117 n = 5000
118 inputs = np.random.permutation(
119 np.linspace(0, 100, b * n, dtype=dtype)).reshape(b, n)
120 indices = np.argsort(-inputs, axis=1)
121 values = -np.sort(-inputs, axis=1)
122 self._validateTopK(inputs, n, values, indices)
123
124 def testLargeSort(self):
125 self._testLargeSort(np.float32)

Callers 1

testLargeSortMethod · 0.95

Calls 4

_validateTopKMethod · 0.95
reshapeMethod · 0.80
permutationMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected