Use fixed number to test

This commit is contained in:
Tzu-Wei Sung 2020-12-08 20:53:39 -08:00
parent a49b21b06e
commit 620fa97685

View File

@ -110,7 +110,7 @@ class UniqueTest(test.TestCase):
@test_util.run_deprecated_v1
def testShapeInferenceV2(self):
"""Test shape inference."""
x = np.random.randint(2, high=10, size=(3, 2, 1))
x = np.arange(6).reshape(3, 2, 1)
_, idx = gen_array_ops.unique_v2(x, axis=[0])
self.assertEqual(idx.shape.as_list(), [3])
_, idx = gen_array_ops.unique_v2(x, axis=[1])