提交 2f72a1e7 编写于 作者: R Ruilong Liu 提交者: GitHub

Merge pull request #605 from codeWorm2015/develop

fix #604 add macro
...@@ -47,6 +47,10 @@ class PaddleMobile { ...@@ -47,6 +47,10 @@ class PaddleMobile {
* */ * */
bool Load(const std::string &model_path, const std::string &para_path, bool Load(const std::string &model_path, const std::string &para_path,
bool optimize = false, int batch_size = 1); bool optimize = false, int batch_size = 1);
/*
* @b 设置线程数, 当 cmake 中开启 openmp 时生效
* */
void SetThreadNum(int num); void SetThreadNum(int num);
/* /*
......
...@@ -77,11 +77,15 @@ void PoolCompute(const PoolParam &param) { ...@@ -77,11 +77,15 @@ void PoolCompute(const PoolParam &param) {
} else if (ksize[0] == 2 && ksize[0] == ksize[1]) { } else if (ksize[0] == 2 && ksize[0] == ksize[1]) {
#if __ARM_NEON #if __ARM_NEON
#if __aarch64__
PoolBasic(pooling_type, ksize, strides, paddings, in_x, out);
#else
if (pooling_type == "max") { if (pooling_type == "max") {
math::Pool2x2Max(strides, paddings, in_x, out); math::Pool2x2Max(strides, paddings, in_x, out);
} else if (pooling_type == "avg") { } else if (pooling_type == "avg") {
math::Pool2x2Avg(strides, paddings, in_x, out); math::Pool2x2Avg(strides, paddings, in_x, out);
} }
#endif
#else #else
PoolBasic(pooling_type, ksize, strides, paddings, in_x, out); PoolBasic(pooling_type, ksize, strides, paddings, in_x, out);
#endif // __ARM_NEON #endif // __ARM_NEON
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册