Skip to content

Commit

Permalink
Fix a crash in android_deploy demo. (apache#2073)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaoDaoSu authored and AWS Neo committed Feb 20, 2019
1 parent 3b343b4 commit 3677708
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -630,4 +630,4 @@ public static Matrix getTransformationMatrix(

return matrix;
}
}
}

0 comments on commit 3677708

Please sign in to comment.