alibaba / MNN

MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba
http://www.mnn.zone/
8.66k stars 1.66k forks source link

I have a model converted from TF to MNN that cannot get the output. #1124

Closed TCBocean closed 4 years ago

TCBocean commented 4 years ago

The model runs on an Android phone.The SoC of the phone is Snapdragon 660.

I used the 1.0.1 and commit 5b3ed465c554ce1ab7023bb6126bf8d837e4ee60 versions in github to try.

The compilation platform is ubuntu18.04, and the compilation method refers to Yuque's tutorial. No errors were reported during compilation.

My model is converted from the pb model of tf1.15.The model structure is Bisenetv2 with some modifications. My model is shared on Baidu Cloud: pb model: https://pan.baidu.com/s/1964AbWUYyF71-VM7YqY6Zw br8a mnn model: https://pan.baidu.com/s/1tiZhSC38ldwpdOkc7brdAg clut The main code of model call is as follows:

auto interpreter      = MNN::Interpreter::createFromFile(modelName);
MNN::ScheduleConfig config;
config.type = MNN_FORWARD_CPU;
config.numThread = 4;
MNN::BackendConfig backendConfig;
backendConfig.precision = MNN::BackendConfig::Precision_High; 
backendConfig.power = MNN::BackendConfig::Power_High; 
backendConfig.memory = MNN::BackendConfig::Memory_High;
config.backendConfig = &backendConfig;
auto session =  interpreter->createSession(config);
auto input = interpreter->getSessionInput(session, "input_1_1");
int width = 352;
int height = 352;
int c = 3;
interpreter->resizeTensor(input, {1, c, width, height});
interpreter->resizeSession(session);
auto output1 = interpreter->getSessionOutput(session, "conv2d_42_1/Conv2D");
Data_Generator *data_generator = new Data_Generator(height, width, c);
auto inputtensor = new MNN::Tensor(input, MNN::Tensor::TENSORFLOW);
float * input_ptr = inputtensor->host<float>();
data_generator->set_all_ones(input_ptr);  // Generate a set of all-in-one inputs
input->copyFromHostTensor(inputtensor);
interpreter->runSession(session);
auto copy_output1 = new MNN::Tensor(output1, MNN::Tensor::TENSORFLOW);
output1->copyToHostTensor(copy_output1);

The above code can run normally. interpreter->runSession(session); The running time is about 420ms. So I guess the network is running, but it will crash when getting the output such as float test = copy_output1->host<float>()[0]; The crash information is as follows:

2020-09-14 09:33:40.447 19225-19225/com.stars.mnnspeadtest A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 19225 (rs.mnnspeadtest), pid 19225 (rs.mnnspeadtest)
2020-09-14 09:33:40.448 19256-19256/? E/BLUR_DEBUG: nCreateNativeFunctor
2020-09-14 09:33:40.507 2035-3682/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.stars.mnnspeadtest/com.stars.mnnspeadtest.MainActivity/1
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG: Build fingerprint: 'Xiaomi/jason/jason:9/PKQ1.181007.001/V12.0.1.0.PCHCNXM:user/release-keys'
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG: Revision: '0'
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG: ABI: 'arm64'
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG: pid: 19225, tid: 19225, name: rs.mnnspeadtest  >>> com.stars.mnnspeadtest <<<
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG: Cause: null pointer dereference
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG:     x0  0000000000000000  x1  0000007ff16fb130  x2  0000000000000005  x3  0000000000000003
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG:     x4  0025730000000000  x5  0080800000000000  x6  1c25000000000000  x7  000000000080a51c
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG:     x8  0000000000000000  x9  6aeb4613d08058c9  x10 0000007ff16fb2d0  x11 0000000000000011
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG:     x12 0000000000000028  x13 0000000000000001  x14 ffffffffffffffff  x15 1c25000000000000
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG:     x16 0000007afa5f4ed0  x17 0000007afa5f0078  x18 0000000000000010  x19 0000007b13c14c00
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG:     x20 0000007b135c2500  x21 0000007b13c14c00  x22 0000007ff16fbd70  x23 0000007aface18e1
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG:     x24 0000000000000008  x25 0000007b99ac95e0  x26 0000007b13c14ca0  x27 0000000000000002
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG:     x28 0000000000000007  x29 0000007ff16fbaa0
2020-09-14 09:33:40.568 19284-19284/? A/DEBUG:     sp  0000007ff16fb840  lr  0000007afa5efb30  pc  0000007afa5efb3c
2020-09-14 09:33:40.649 695-3269/? E/ANDR-PERF-MPCTL: poll() has timed out for /sys/module/msm_performance/events/cpu_hotplug
2020-09-14 09:33:40.649 695-3269/? E/ANDR-PERF-MPCTL: Block on poll()
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG: backtrace:
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #00 pc 0000000000002b3c  /data/app/com.stars.mnnspeadtest-9UXR32PWqiMMSgsetME9Eg==/lib/arm64/libmnncore.so (Java_com_stars_mnnspeadtest_MainActivity_nativeNetForward+1280)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #01 pc 000000000000a0b8  /data/app/com.stars.mnnspeadtest-9UXR32PWqiMMSgsetME9Eg==/oat/arm64/base.odex (offset 0xa000) (com.stars.mnnspeadtest.MainActivity.nativeNetForward+152)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #02 pc 0000000000557388  /system/lib64/libart.so (art_quick_invoke_stub+584)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #03 pc 00000000000cfcc8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #04 pc 0000000000280338  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #05 pc 000000000027a34c  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #06 pc 000000000052786c  /system/lib64/libart.so (MterpInvokeDirect+296)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #07 pc 0000000000549a94  /system/lib64/libart.so (ExecuteMterpImpl+14484)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #08 pc 00000000002110f0  /data/app/com.stars.mnnspeadtest-9UXR32PWqiMMSgsetME9Eg==/oat/arm64/base.vdex (com.stars.mnnspeadtest.MainActivity.onCreate+158)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #09 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #10 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #11 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #12 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #13 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #14 pc 000000000043ef50  /system/framework/boot-framework.vdex (android.app.Activity.performCreate+32)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #15 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #16 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #17 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #18 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #19 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #20 pc 000000000043ef24  /system/framework/boot-framework.vdex (android.app.Activity.performCreate+2)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #21 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #22 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #23 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #24 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #25 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #26 pc 000000000047d416  /system/framework/boot-framework.vdex (android.app.Instrumentation.callActivityOnCreate+6)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #27 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #28 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.011 19284-19284/? A/DEBUG:     #29 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #30 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #31 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #32 pc 000000000043138a  /system/framework/boot-framework.vdex (android.app.ActivityThread.performLaunchActivity+736)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #33 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #34 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #35 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #36 pc 000000000052786c  /system/lib64/libart.so (MterpInvokeDirect+296)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #37 pc 0000000000549a94  /system/lib64/libart.so (ExecuteMterpImpl+14484)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #38 pc 0000000000431022  /system/framework/boot-framework.vdex (android.app.ActivityThread.handleLaunchActivity+72)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #39 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #40 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #41 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #42 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #43 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #44 pc 00000000004c6a50  /system/framework/boot-framework.vdex (android.app.servertransaction.LaunchActivityItem.execute+114)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #45 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #46 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #47 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #48 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #49 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #50 pc 00000000004c81a0  /system/framework/boot-framework.vdex (android.app.servertransaction.TransactionExecutor.executeCallbacks+198)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #51 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #52 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #53 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #54 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #55 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #56 pc 00000000004c80b2  /system/framework/boot-framework.vdex (android.app.servertransaction.TransactionExecutor.execute+68)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #57 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #58 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #59 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #60 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #61 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #62 pc 000000000043032c  /system/framework/boot-framework.vdex (android.app.ActivityThread$H.handleMessage+72)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #63 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #64 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #65 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #66 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #67 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #68 pc 0000000000bdcb56  /system/framework/boot-framework.vdex (android.os.Handler.dispatchMessage+42)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #69 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #70 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #71 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #72 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #73 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #74 pc 0000000000bef6aa  /system/framework/boot-framework.vdex (android.os.Looper.loop+414)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #75 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.012 19284-19284/? A/DEBUG:     #76 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #77 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #78 pc 0000000000527a30  /system/lib64/libart.so (MterpInvokeStatic+204)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #79 pc 0000000000549b14  /system/lib64/libart.so (ExecuteMterpImpl+14612)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #80 pc 00000000004390fa  /system/framework/boot-framework.vdex (android.app.ActivityThread.main+214)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #81 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #82 pc 0000000000516de0  /system/lib64/libart.so (artQuickToInterpreterBridge+1020)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #83 pc 00000000005604fc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #84 pc 000000000055764c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #85 pc 00000000000cfce8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #86 pc 000000000045de48  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #87 pc 000000000045f89c  /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #88 pc 00000000003ef398  /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #89 pc 000000000078eed4  /system/framework/arm64/boot-core-oj.oat (offset 0x2dc000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #90 pc 0000000000557388  /system/lib64/libart.so (art_quick_invoke_stub+584)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #91 pc 00000000000cfcc8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #92 pc 0000000000280338  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #93 pc 000000000027a34c  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #94 pc 000000000052652c  /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #95 pc 0000000000549994  /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #96 pc 00000000012a621c  /system/framework/boot-framework.vdex (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #97 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.972697677+488)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #98 pc 0000000000516de0  /system/lib64/libart.so (artQuickToInterpreterBridge+1020)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #99 pc 00000000005604fc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #100 pc 00000000024b3058  /system/framework/arm64/boot-framework.oat (offset 0xa59000) (com.android.internal.os.ZygoteInit.main+2104)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #101 pc 000000000055764c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #102 pc 00000000000cfce8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #103 pc 000000000045de48  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #104 pc 000000000045daa8  /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+424)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #105 pc 0000000000362cd8  /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+652)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #106 pc 00000000000b4220  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+116)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #107 pc 00000000000b6dbc  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+924)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #108 pc 0000000000002528  /system/bin/app_process64 (main+2012)
2020-09-14 09:33:41.013 19284-19284/? A/DEBUG:     #109 pc 00000000000c8584  /system/lib64/libc.so (__libc_init+88)

I have printed copy_output1->elementSize() and the value obtained is 0. Can anyone help me please? Grateful.

hjchen2 commented 4 years ago

It seems that the shape inference error for the eltwise operator named by tf_op_layer_add_8/add_8 since broadcasting the first input is not supported for eltwise operator in MNN, and it is leading to empty size output.

We will fix the problem soon, and maybe you could insert a broadcast op between the Relu op named by re_lu_23_1/Relu and the AddV2 op named by tf_op_layer_add_8/add_8 currently.

hjchen2 commented 4 years ago

Close this issue since problem has been resolved.

TCBocean commented 4 years ago

thank you very much