Share via


InferenceInput.GetInputData Method

Definition

An array of input data.

[Android.Runtime.Register("getInputData", "()[Ljava/lang/Object;", "", ApiSince=35)]
public Java.Lang.Object[] GetInputData ();
[<Android.Runtime.Register("getInputData", "()[Ljava/lang/Object;", "", ApiSince=35)>]
member this.GetInputData : unit -> Java.Lang.Object[]

Returns

Object[]
Attributes

Remarks

An array of input data. The inputs should be in the same order as inputs of the model.

For example, if a model takes multiple inputs:

{@code
            String[] input0 = {"foo", "bar"}; // string tensor shape is [2].
            int[] input1 = new int[]{3, 2, 1}; // int tensor shape is [3].
            Object[] inputData = {input0, input1, ...};
            }

For TFLite, this field is mapped to inputs of runForMultipleInputsOutputs: https://www.tensorflow.org/lite/api_docs/java/org/tensorflow/lite/InterpreterApi#parameters_9

Java documentation for android.adservices.ondevicepersonalization.InferenceInput.getInputData().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to