diff --git a/apps/android_deploy/app/src/main/java/ml/dmlc/tvm/android/demo/MainActivity.java b/apps/android_deploy/app/src/main/java/ml/dmlc/tvm/android/demo/MainActivity.java index f3cdefe1c2ff..7d391856f599 100644 --- a/apps/android_deploy/app/src/main/java/ml/dmlc/tvm/android/demo/MainActivity.java +++ b/apps/android_deploy/app/src/main/java/ml/dmlc/tvm/android/demo/MainActivity.java @@ -298,7 +298,7 @@ protected Integer doInBackground(Bitmap... bitmaps) { // get the function from the module(get output data) Log.i(TAG, "get output data"); - NDArray outputNdArray = NDArray.empty(new long[]{1000}, new TVMType("float32")); + NDArray outputNdArray = NDArray.empty(new long[]{1, 1000}, new TVMType("float32")); Function getOutputFunc = graphRuntimeModule.getFunction("get_output"); getOutputFunc.pushArg(OUTPUT_INDEX).pushArg(outputNdArray).invoke(); float[] output = outputNdArray.asFloatArray(); @@ -630,4 +630,4 @@ public static Matrix getTransformationMatrix( return matrix; } -} \ No newline at end of file +}