From 76553c5a6d198d731fd2331345684bc2cfdab881 Mon Sep 17 00:00:00 2001 From: bingyanghuang Date: Fri, 14 Sep 2018 16:01:38 +0800 Subject: [PATCH] fix travis-ci --- paddle/fluid/operators/math/sequence_pooling.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/operators/math/sequence_pooling.cc b/paddle/fluid/operators/math/sequence_pooling.cc index f531cc058..69318a659 100644 --- a/paddle/fluid/operators/math/sequence_pooling.cc +++ b/paddle/fluid/operators/math/sequence_pooling.cc @@ -107,7 +107,8 @@ template class LastSeqPoolFunctor { public: void operator()(const platform::CPUDeviceContext& context, - const framework::LoDTensor& input, framework::Tensor* output) { + const framework::LoDTensor& input, + framework::Tensor* output) { // Create pointers to input and output data auto* in_data = input.data(); auto* out_data = output->data(); @@ -124,7 +125,7 @@ class LastSeqPoolFunctor { // Copy the last item of sequence to output std::memcpy(out_data, (in_data - item_size), item_size * sizeof(T)); out_data += item_size; - } + } } }; @@ -132,7 +133,8 @@ template class FirstSeqPoolFunctor { public: void operator()(const platform::CPUDeviceContext& context, - const framework::LoDTensor& input, framework::Tensor* output) { + const framework::LoDTensor& input, + framework::Tensor* output) { // Create pointers to input and output data auto* in_data = input.data(); auto* out_data = output->data(); @@ -149,7 +151,7 @@ class FirstSeqPoolFunctor { // Point to the next sequence in_data += seq_len * item_size; out_data += item_size; - } + } } }; @@ -176,8 +178,6 @@ class SequencePoolFunctor { first_pool(context, input, output); return; } - - auto lod = input.lod()[0]; auto& place = *context.eigen_device(); for (int i = 0; i < static_cast(lod.size()) - 1; ++i) { -- GitLab