From b067639621f526e75ca4c20788b2475e2e61cafd Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 27 Oct 2017 14:07:06 -0700 Subject: [PATCH] Fix clang compile (#5171) --- paddle/operators/sequence_pool_op.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/operators/sequence_pool_op.h b/paddle/operators/sequence_pool_op.h index ead30e8e90b..07bf61df45b 100644 --- a/paddle/operators/sequence_pool_op.h +++ b/paddle/operators/sequence_pool_op.h @@ -144,11 +144,11 @@ class SequencePoolGradKernel : public framework::OpKernel { Eigen::Map> in_t_map(in_t.data(), h, w); int row_id; - Eigen::array extents = {1, 1}; + Eigen::array extents{{1, 1}}; for (int col_id = 0; col_id < w; col_id++) { in_t_map.col(col_id).maxCoeff(&row_id); - Eigen::array in_offsets = {row_id, col_id}; - Eigen::array out_offsets = {0, col_id}; + Eigen::array in_offsets{{row_id, col_id}}; + Eigen::array out_offsets{{0, col_id}}; in_g_e.slice(in_offsets, extents).device(place) = out_g_e.slice(out_offsets, extents); } -- GitLab