Hi TensorFlow team,
I have created a linear regression model that takes a pandas dataframe with five columns and generates an output of array of float arrays of 3 elements. To illustrate this, I have created a Colab notebook linear_regression.ipynb under Colab Notebooks - Google Drive 2
I have converted the model to Tensorflow Lite (see linear_regression.tflite in the same folder that has the notebook). I am now trying to figure out how to use this model in Java to run on Android. Below is my initial code:
LinearRegression model = LinearRegression.newInstance(context);
double features[] = {0.195312, 0.05913, 0.089844, 0.550781, 0.320312};
ByteBuffer bb = ByteBuffer.allocate(features.length * 4);
for (double f : features)
    bb.putFloat((float) f);
// The default code suggested in Android Studio mentions it should be new int[]{1, 1}, so I am not sure
TensorBuffer tb = TensorBuffer.createFixedSize(new int[]{1, 5}, DataType.FLOAT32); 
tb.loadBuffer(bb);
LinearRegression.Outputs outputs = model.process(tb);

Sure enough, I got the following exception:
java.lang.IllegalArgumentException: Cannot copy to a TensorFlowLite tensor (serving_default_normalization_input:0) with 4 bytes from a Java Buffer with 20 bytes.

What is the correct way of passing the input to the model and getting output from the model?