pre-commit check

fix-develop-build.sh
bingyanghuang 7 years ago
parent 7429067ab3
commit 1454cd54aa

@ -123,12 +123,11 @@ class LastFirstSeqPoolFunctor {
int64_t seq_len = static_cast<int64_t>(lod[i + 1] - lod[i]);
// Point to the begin of next sequence
in_data += seq_len * item_size;
//Copy the last item to output
// Copy the last item of sequence to output
std::memcpy(out_data, (in_data - item_size), item_size * sizeof(T));
out_data += item_size;
}
}
else if(pooltype == "FIRST"){
} else if (pooltype == "FIRST") {
for (int i = 0; i < seq_num; ++i) {
// Calculate the length of each sequence
int64_t seq_len = static_cast<int64_t>(lod[i + 1] - lod[i]);
@ -138,8 +137,7 @@ class LastFirstSeqPoolFunctor {
in_data += seq_len * item_size;
out_data += item_size;
}
}
else {
} else {
PADDLE_THROW("it's not LAST or FIRST pool type");
}
}

Loading…
Cancel
Save