diff --git a/paddle/operators/sequence_pool_op.h b/paddle/operators/sequence_pool_op.h index ead30e8e90b25..07bf61df45bf5 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); }