An uint8 NDArray failed to use asByteArray


#1

The output NDArray of my model is with shape [1200, 1600, 3] and TVMtype uint8, I failed to convert it to ByteArray with asByteArray.
--------- beginning of crash
07-17 18:38:42.798 7648 7690 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
07-17 18:38:42.798 7648 7690 E AndroidRuntime: Process: ml.dmlc.tvm.android.demo, PID: 7648
07-17 18:38:42.798 7648 7690 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:366)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:271)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:257)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at java.lang.Thread.run(Thread.java:784)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: Cannot set convert to byte[] for uint8 array
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at ml.dmlc.tvm.NDArray.asByteArray(NDArray.java:330)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at ml.dmlc.tvm.android.demo.MainActivity$ModelRunAsyncTask.doInBackground(MainActivity.java:497)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at ml.dmlc.tvm.android.demo.MainActivity$ModelRunAsyncTask.doInBackground(MainActivity.java:311)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:345)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
07-17 18:38:42.798 7648 7690 E AndroidRuntime: … 4 more
07-17 18:38:42.805 1211 2180 W ActivityManager: finishTopCrashedActivityLocked Force finishing activity ml.dmlc.tvm.android.demo/.MainActivity

How can I convert this NDArray to java datatype with which I can convert it to a bitmap? Could anyone help me? Thanks in advance!