Problem in tuning and deploying tflite model on arm target via rpc


#1

Hi, I am trying to autotune the tflite model mobilenet_v1_1.0_224.tflite using. I used the code for tuning mxnet model and made some changes for the above mentioned model. Looks like tuning is happening but at last when we are try to deploy it to at arm target it throws some error. (Currently I was using 10 number of trials for every task, just for the test purpose) Following are the logs:

Extract tasks…
File mobilenet_v1_1.0_224.tgz existed, skip.
Tuning…
[Task 1/20] Current/Best: 0.63/ 5.92 GFLOPS | Progress: (10/10) | 15.94 s Done.
[Task 2/20] Current/Best: 0.85/ 3.99 GFLOPS | Progress: (10/10) | 6.54 s Done.
[Task 3/20] Current/Best: 4.62/ 6.91 GFLOPS | Progress: (10/10) | 7.15 s Done.
[Task 4/20] Current/Best: 1.01/ 1.94 GFLOPS | Progress: (10/10) | 5.10 s Done.
[Task 5/20] Current/Best: 3.18/ 3.49 GFLOPS | Progress: (10/10) | 10.17 s Done.
[Task 6/20] Current/Best: 1.36/ 1.36 GFLOPS | Progress: (10/10) | 3.33 s Done.
[Task 7/20] Current/Best: 1.69/ 8.85 GFLOPS | Progress: (10/10) | 4.15 s Done.
[Task 8/20] Current/Best: 0.53/ 3.08 GFLOPS | Progress: (10/10) | 14.34 s Done.
[Task 9/20] Current/Best: 3.67/ 9.57 GFLOPS | Progress: (10/10) | 6.57 s Done.
[Task 10/20] Current/Best: 2.01/ 2.01 GFLOPS | Progress: (10/10) | 7.32 s Done.
[Task 11/20] Current/Best: 3.95/ 10.97 GFLOPS | Progress: (10/10) | 16.84 s Done.
[Task 12/20] Current/Best: 1.41/ 2.62 GFLOPS | Progress: (10/10) | 5.87 s Done.
[Task 13/20] Current/Best: 9.62/ 10.89 GFLOPS | Progress: (10/10) | 5.09 s Done.
[Task 14/20] Current/Best: 0.00/ 2.52 GFLOPS | Progress: (10/10) | 12.28 s Done.
[Task 15/20] Current/Best: 4.06/ 14.68 GFLOPS | Progress: (10/10) | 7.10 s Done.
[Task 16/20] Current/Best: 0.45/ 2.15 GFLOPS | Progress: (10/10) | 12.44 s Done.
[Task 17/20] Current/Best: 4.41/ 6.61 GFLOPS | Progress: (10/10) | 4.77 s Done.
[Task 18/20] Current/Best: 0.00/ 1.96 GFLOPS | Progress: (10/10) | 29.38 s Done.
[Task 19/20] Current/Best: 6.53/ 8.62 GFLOPS | Progress: (10/10) | 6.84 s Done.
[Task 20/20] Current/Best: 3.63/ 5.71 GFLOPS | Progress: (10/10) | 2.83 s Done.
Compile…
Upload…
Traceback (most recent call last):
File “tune_relay_arm.py”, line 443, in
tune_and_evaluate(tuning_option)
File “tune_relay_arm.py”, line 416, in tune_and_evaluate
module.set_input(‘data’, data_tvm)
File “/home/yovan/tvm_all/tvm/python/tvm/contrib/graph_runtime.py”, line 132, in set_input
self._get_input(key).copyfrom(value)
File “tvm/_ffi/_cython/./function.pxi”, line 286, in tvm._ffi._cy2.core.FunctionBase.call
File “tvm/_ffi/_cython/./function.pxi”, line 221, in tvm._ffi._cy2.core.FuncCall
File “tvm/_ffi/_cython/./function.pxi”, line 210, in tvm._ffi._cy2.core.FuncCall3
File “tvm/_ffi/_cython/./base.pxi”, line 143, in tvm._ffi._cy2.core.CALL
tvm._ffi.base.TVMError: Except caught from RPC call: [15:41:12] /home/yovan/tvm_all/tvm/apps/android_rpc/app/src/main/jni/…/…/…/…/…/…/include/…/src/runtime/graph/graph_runtime.cc:339: Check failed: in_idx >= 0 (-1 vs. 0)


#2

The input tensor name is not data. It is input Please read this tutorial to make sure everything is fine. https://docs.tvm.ai/tutorials/frontend/from_tflite.html#sphx-glr-tutorials-frontend-from-tflite-py


[solved]Getting same output after deploying tflite on arm_cpu
#3

thanks @FrozenGene, got it resolved.