From 2fe35e338c33c0b5bf86a281b42d215f9a9c6c0f Mon Sep 17 00:00:00 2001 From: seiriosPlus Date: Sat, 19 Sep 2020 17:18:03 +0800 Subject: [PATCH] fix UT --- .../unittests/test_dist_lookup_sparse_table_fuse_ops.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_dist_lookup_sparse_table_fuse_ops.py b/python/paddle/fluid/tests/unittests/test_dist_lookup_sparse_table_fuse_ops.py index b2bf6e546e7..bca91c536ba 100644 --- a/python/paddle/fluid/tests/unittests/test_dist_lookup_sparse_table_fuse_ops.py +++ b/python/paddle/fluid/tests/unittests/test_dist_lookup_sparse_table_fuse_ops.py @@ -94,8 +94,10 @@ class TestLookupTableFuseOp(unittest.TestCase): training_program = fluid.Program() - scope.var('Beta1Pow').get_tensor().set([0], place) - scope.var('Beta2Pow').get_tensor().set([0], place) + scope.var('Beta1Pow').get_tensor().set( + np.array([0]).astype("float32"), place) + scope.var('Beta2Pow').get_tensor().set( + np.array([0]).astype("float32"), place) rows = [0, 1, 2, 3, 4, 5, 6] row_numel = 8 -- GitLab