diff --git a/src/framework/executor.cpp b/src/framework/executor.cpp index 3641cb963d29b2d3ba4a0bfe241f38a7d1b7bc36..884f5200f2bd9ec1b86429b4d37c3e58ea16724e 100644 --- a/src/framework/executor.cpp +++ b/src/framework/executor.cpp @@ -399,8 +399,7 @@ void Executor::FeedData(const Tensor &t) { template std::shared_ptr Executor::FetchResult(int id) { - std::shared_ptr to_predict_block = program_desc_->Block(0); - auto &ops = ops_of_block_[*to_predict_block.get()]; + auto &ops = ops_of_block_[0]; PADDLE_MOBILE_ENFORCE(id < (int)ops.size(), "Index out of range"); auto op = id < 0 ? ops[ops.size() - 1] : ops[id]; @@ -414,8 +413,7 @@ std::shared_ptr Executor::FetchResult(int id) { template void Executor::Predict_From_To(int start, int end) { - std::shared_ptr to_predict_block = program_desc_->Block(0); - auto &ops = ops_of_block_[*to_predict_block.get()]; + auto &ops = ops_of_block_[0]; end = end < 0 ? static_cast(ops.size()) : end; PADDLE_MOBILE_ENFORCE(start >= 0 && start < end && end <= ops.size(), "start or end parameter is wrong"); diff --git a/src/operators/kernel/fpga/V1/conv_bn_kernel.cpp b/src/operators/kernel/fpga/V1/conv_bn_kernel.cpp index ac9f19e411a87bb31e320df504a0e1c88e195454..da10350553ddef7a15414b1583580219491e2306 100644 --- a/src/operators/kernel/fpga/V1/conv_bn_kernel.cpp +++ b/src/operators/kernel/fpga/V1/conv_bn_kernel.cpp @@ -15,6 +15,7 @@ limitations under the License. */ #ifdef FUSION_CONVBN_OP #include "operators/kernel/conv_bn_kernel.h" +#include namespace paddle_mobile { namespace operators { diff --git a/src/operators/kernel/fpga/V1/conv_bn_relu_kernel.cpp b/src/operators/kernel/fpga/V1/conv_bn_relu_kernel.cpp index 4c9eb391ada9366478877494fbe466d5cf919327..1382b20cdfc201cc5e048871bf3ebac22ef7ba7e 100644 --- a/src/operators/kernel/fpga/V1/conv_bn_relu_kernel.cpp +++ b/src/operators/kernel/fpga/V1/conv_bn_relu_kernel.cpp @@ -15,6 +15,7 @@ limitations under the License. */ #ifdef FUSION_CONVBNRELU_OP #include "operators/kernel/conv_bn_relu_kernel.h" +#include namespace paddle_mobile { namespace operators { diff --git a/src/operators/math/softmax.cpp b/src/operators/math/softmax.cpp index 756f707d95e5a2338c9707b40e0eb008d956a2b2..48f8b35ea22f30ceb7e9bf8bcefa815a63b6e9dc 100644 --- a/src/operators/math/softmax.cpp +++ b/src/operators/math/softmax.cpp @@ -97,7 +97,7 @@ void SoftmaxFuntor::operator()(const framework::Tensor *X, } #endif // __ARM_NEON__ for (int i = 0; i < remain; ++i) { - output[i] = std::expf(input[i] - max); + output[i] = expf(input[i] - max); } // sum(exp(x - max))