XiaoMi / mace-models

Mobile AI Compute Engine Model Zoo
Apache License 2.0
368 stars 72 forks source link

configure output for yolov3 model #15

Closed XinCode closed 5 years ago

XinCode commented 5 years ago

Hi mace team, I am trying to deploy yolov3 model with mace. As indicated in yml file, the output tensors is configured as follows:

output_tensors:

However, in the android tutorial "mace/examples/android/macelibrary/src/main/cpp/image_classify.cc"

struct ModelInfo { std::string input_name; std::string output_name; std::vector input_shape; std::vector output_shape; };

The output_name is defined as a string, so how to set input_name? Use one of the three layer names or use all of them? I tried conv2d_59/BiasAdd:0, conv2d_67/BiasAdd:0 and conv2d_75/BiasAdd:0 individually but the model always crashed during run time:

A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc8680000 in tid 16879 (jniThread), pid 16852 (iaomi.mace.demo)

Please kindly advise on this issue.

lee-bin commented 5 years ago

You can refer to the command line example https://github.com/XiaoMi/mace/blob/master/examples/cli/example.cc#L159