From c5742f79f1e4b61008da62afb8a0d3490f7b513b Mon Sep 17 00:00:00 2001 From: xuezhong Date: Wed, 13 Feb 2019 04:33:08 +0000 Subject: [PATCH] set label type to int64 to pass windows test test=develop --- python/paddle/fluid/tests/unittests/test_sample_logits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_sample_logits.py b/python/paddle/fluid/tests/unittests/test_sample_logits.py index ed51b04dc..d7b2a6207 100644 --- a/python/paddle/fluid/tests/unittests/test_sample_logits.py +++ b/python/paddle/fluid/tests/unittests/test_sample_logits.py @@ -263,7 +263,7 @@ class TestSampleLogitsOpV2(OpTest): 'remove_accidental_hits': remove_accidental_hits, 'seed': seed } - self.inputs = {'Logits': logits, 'Label': label} + self.inputs = {'Logits': logits, 'Label': label.astype(np.int64)} def set_data(self, num_classes, num_samples, seed, remove_accidental_hits): label = np.array([[6, 12, 15, 5, 1], [0, 9, 4, 1, 10], @@ -347,7 +347,7 @@ class TestSampleLogitsOpV3(OpTest): 'remove_accidental_hits': remove_accidental_hits, 'seed': seed } - self.inputs = {'Logits': logits, 'Label': label} + self.inputs = {'Logits': logits, 'Label': label.astype(np.int64)} def set_data(self, num_classes, num_samples, seed, remove_accidental_hits): label = [52, 2, 2, 17, 96, 2, 17, 96, 37, 2] -- GitLab