I have a model that predicts the age and gender of the input image of size 160X160. I am creating a byte buffer to input the image to the model and everything works just fine when using a model with only one output.
But when I am using the tflite.runForMultipleInputsOutputs(), I am getting garbage values which are of the form -> [[F@e233 etc.
I have followed the documentation and the sample apps to the detail and have been stuck at this for almost 2 days. Please help.
I am posting my code below for reference.
The model has 2 outputs:
Edit:
age -> float32 [1, 101]
gender -> float32 [1,2]
P.S - I am not doing anything with the output as of now. I just want to see the result of the model.
String classifyImage(Bitmap bitmap){
try{
ByteBuffer byteBuffer = convertBitmaptoByteBuffer(bitmap);
float[][] out_gender = new float[1][2];
float[][] out_age = new float[1][101];
Object[] input = {byteBuffer};
Map<Integer, Object> outputs = new HashMap();
outputs.put(0, out_age);
outputs.put(1, out_gender);
interpreter.runForMultipleInputsOutputs(input, outputs);
}catch (Exception e){
e.printStackTrace();
}
return "";
}