facebookresearch/d2go

D2Go Model Returns Empty Output on Android

rochist opened this issue · 0 comments

I'm encountering an issue when running a D2Go model on Android. The model was created and exported using a Docker environment. It functions as expected in the Docker environment, but when used in the Android application, the model's output is an empty tuple.

Here's a brief overview:

The model is created and exported using D2Go in a Docker environment with CUDA 11.8.0 and Python 3.10. The PyTorch version used is from the https://download.pytorch.org/whl/cu118 index URL.

In the Android application, the model is loaded and run using the following key dependencies:

PyTorch Android Lite version 1.13.1 -(I tried with lower versions and it crushed on load [LiteModuleLoader.load])
TorchVision Ops version 0.14.0
However, the output IValue from the model is a tuple of size 4, but each element of this tuple is empty:

IValue output = mModule.forward(IValue.from(inputTensor));
IValue [] outputTuple = output.toTuple();
I have not encountered similar issues when running the model in other environments. Any assistance in diagnosing and resolving this problem would be greatly appreciated.