android-demo-app icon indicating copy to clipboard operation
android-demo-app copied to clipboard

When I click the detect button, the app crashes abnormally (I am using the model I trained myself, not the yolov5 model )

Open zjnlxk opened this issue 2 years ago • 4 comments

zjnlxk avatar Mar 02 '22 08:03 zjnlxk

捕获

zjnlxk avatar Mar 02 '22 09:03 zjnlxk

You need to convert the output to Tensor

final Tensor outputTensor = mModule.forward(IValue.from(mInputTensor)).toTensor();

bebbieyin avatar Mar 05 '22 06:03 bebbieyin

I am also facing the same issue. @bebbieyin it's already converted to Tensor

Shahrullo avatar Apr 13 '22 02:04 Shahrullo

After all, I solved the problem. The error kept showing up even after converting the output to Tensor. By upgrading my gradle to higher version, the model started working well. @zjnlxk to to update your gradle version

Shahrullo avatar Apr 13 '22 04:04 Shahrullo