Share via


InferenceInput.ExpectedOutputStructure Property

Definition

The empty InferenceOutput representing the expected output structure.

public Android.AdServices.OnDevicePersonalization.InferenceOutput ExpectedOutputStructure { [Android.Runtime.Register("getExpectedOutputStructure", "()Landroid/adservices/ondevicepersonalization/InferenceOutput;", "", ApiSince=35)] get; }
[<get: Android.Runtime.Register("getExpectedOutputStructure", "()Landroid/adservices/ondevicepersonalization/InferenceOutput;", "", ApiSince=35)>]
member this.ExpectedOutputStructure : Android.AdServices.OnDevicePersonalization.InferenceOutput

Property Value

Attributes

Remarks

The empty InferenceOutput representing the expected output structure. For TFLite, the inference code will verify whether this expected output structure matches model output signature.

If a model produce string tensors:

{@code
            String[] output = new String[3][2];  // Output tensor shape is [3, 2].
            HashMap<Integer, Object> outputs = new HashMap<>();
            outputs.put(0, output);
            expectedOutputStructure = new InferenceOutput.Builder().setDataOutputs(outputs).build();
            }

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

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