From e684e0ffeb9383c9666ebef4c1cff47b8825b64e Mon Sep 17 00:00:00 2001 From: Netpunk <2327994230@qq.com> Date: Thu, 5 May 2022 18:55:35 +0800 Subject: [PATCH] new version --- .../fluid/tests/unittests/test_cosine_embedding_loss.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_cosine_embedding_loss.py b/python/paddle/fluid/tests/unittests/test_cosine_embedding_loss.py index 17e167331b72d..169db219b14fe 100644 --- a/python/paddle/fluid/tests/unittests/test_cosine_embedding_loss.py +++ b/python/paddle/fluid/tests/unittests/test_cosine_embedding_loss.py @@ -211,16 +211,12 @@ class TestClassCosineEmbeddingLoss(unittest.TestCase): def setUp(self): self.input1_np = np.random.random(size=(10, 3)).astype(np.float32) self.input2_np = np.random.random(size=(10, 3)).astype(np.float32) - # self.label_np = np.random.randint( - # low=0, high=2, size=10).astype(np.int64) a = np.array([-1, -1, -1, -1, -1]).astype(np.int64) b = np.array([1, 1, 1, 1, 1]).astype(np.int64) self.label_np = np.concatenate((a, b), axis=0) np.random.shuffle(self.label_np) self.input1_np_1D = np.random.random(size=10).astype(np.float32) self.input2_np_1D = np.random.random(size=10).astype(np.float32) - # self.label_np_1D = np.random.randint( - # low=0, high=2, size=1).astype(np.int64) self.label_np_1D = np.array([1]).astype(np.int64) def run_dynamic(self):