From e4e9450e88a5851cb5bbff12860def544127f850 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Fri, 10 Aug 2018 21:15:10 +0800 Subject: [PATCH] Fix random crop op problem --- python/paddle/fluid/tests/unittests/test_random_crop_op.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/tests/unittests/test_random_crop_op.py b/python/paddle/fluid/tests/unittests/test_random_crop_op.py index 1c708d038..1acd377b1 100644 --- a/python/paddle/fluid/tests/unittests/test_random_crop_op.py +++ b/python/paddle/fluid/tests/unittests/test_random_crop_op.py @@ -21,7 +21,7 @@ from op_test import OpTest class TestRandomCropOp(OpTest): def setUp(self): to_crop = np.array([[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]] * - 5).astype("float32") + 5).astype(np.int32) self.possible_res = [ np.array([[1, 2, 3], [5, 6, 7]]), np.array([[2, 3, 4], [6, 7, 8]]), np.array([[5, 6, 7], [9, 10, 11]]), -- GitLab