From 81bd7eeff4f3581c67cb294f94a14c3b1e97e40d Mon Sep 17 00:00:00 2001 From: peizhilin Date: Fri, 23 Nov 2018 11:04:11 +0800 Subject: [PATCH] rollback the format --- paddle/fluid/operators/beam_search_op_test.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/paddle/fluid/operators/beam_search_op_test.cc b/paddle/fluid/operators/beam_search_op_test.cc index 80fdd22fbb..6e283866ff 100644 --- a/paddle/fluid/operators/beam_search_op_test.cc +++ b/paddle/fluid/operators/beam_search_op_test.cc @@ -30,23 +30,23 @@ using std::endl; void CreateInput(LoDTensor* ids, LoDTensor* scores) { LoD lod; - vector level0{0, 2, 4}; - vector level1{0, 1, 2, 3, 4}; + vector level0({0, 2, 4}); + vector level1({0, 1, 2, 3, 4}); lod.push_back(level0); lod.push_back(level1); ids->set_lod(lod); scores->set_lod(lod); - auto dims = framework::make_ddim(vector{4, 3}); + auto dims = framework::make_ddim(vector({4, 3})); ids->Resize(dims); scores->Resize(dims); CPUPlace place; auto* ids_data = ids->mutable_data(place); auto* scores_data = scores->mutable_data(place); - vector _ids{4, 2, 5, 2, 1, 3, 3, 5, 2, 8, 2, 1}; - vector _scores{0.5f, 0.3f, 0.2f, 0.6f, 0.3f, 0.1f, - 0.9f, 0.5f, 0.1f, 0.7f, 0.5f, 0.1f}; + vector _ids({4, 2, 5, 2, 1, 3, 3, 5, 2, 8, 2, 1}); + vector _scores({0.5f, 0.3f, 0.2f, 0.6f, 0.3f, 0.1f, + 0.9f, 0.5f, 0.1f, 0.7f, 0.5f, 0.1f}); for (int i = 0; i < 12; i++) { ids_data[i] = _ids[i]; @@ -79,8 +79,8 @@ TEST(DISABLED_beam_search_op, run) { ASSERT_EQ(sids.lod(), sscores.lod()); - vector tids{4, 2, 3, 8}; - vector tscores{0.5f, 0.6f, 0.9f, 0.7f}; + vector tids({4, 2, 3, 8}); + vector tscores({0.5f, 0.6f, 0.9f, 0.7f}); for (int i = 0; i < 4; i++) { ASSERT_EQ(tids[i], sids.data()[i]); -- GitLab