From 0457869a3c8b0209abed4e4c260a2efb3aea3668 Mon Sep 17 00:00:00 2001 From: zhaojiaying01 Date: Fri, 5 Jul 2019 12:56:14 +0800 Subject: [PATCH] 1.change ANDROID_PLATFORM_VERSION to android-19; 2.fix feed op infershape. --- src/operators/feed_op.cpp | 5 +++++ tools/build.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/operators/feed_op.cpp b/src/operators/feed_op.cpp index d03f5c3ecb..ffd253073a 100644 --- a/src/operators/feed_op.cpp +++ b/src/operators/feed_op.cpp @@ -24,6 +24,11 @@ void FeedOp::InferShape() const { int col = this->param_.Col(); auto input_dims = this->param_.InputX()->at(col).dims(); this->param_.Out()->Resize(input_dims); + if (input_dims.size() == 4 || input_dims.size() == 2) { + this->param_.Out()->Resize(input_dims); + } else { + this->param_.Out()->Resize(out_dims); + } } } // namespace operators diff --git a/tools/build.sh b/tools/build.sh index 232d81fb2f..f7ae755a81 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -59,7 +59,7 @@ build_for_android() { MODE="Release" - ANDROID_PLATFORM_VERSION="android-22" + ANDROID_PLATFORM_VERSION="android-19" TOOLCHAIN_FILE="./tools/android-cmake/android.toolchain.cmake" ANDROID_ARM_MODE="arm" -- GitLab