Builder
class Builder
kotlin.Any | |
↳ | android.adservices.ondevicepersonalization.InferenceOutput.Builder |
A builder for InferenceOutput
Summary
Public constructors | |
---|---|
Builder() |
Public methods | |
---|---|
InferenceOutput.Builder |
addDataOutput(key: Int, value: Any) |
InferenceOutput |
build() Builds the instance. |
InferenceOutput.Builder |
A byte array that holds input data. |
InferenceOutput.Builder |
setDataOutputs(value: MutableMap<Int!, Any!>) Note: use |
Public constructors
Public methods
addDataOutput
fun addDataOutput(
key: Int,
value: Any
): InferenceOutput.Builder
Parameters | |
---|---|
value |
Any: This value cannot be null . |
Return | |
---|---|
InferenceOutput.Builder |
This value cannot be null . |
See Also
build
fun build(): InferenceOutput
Builds the instance. This builder should not be touched after calling this!
Return | |
---|---|
InferenceOutput |
This value cannot be null . |
setData
fun setData(value: ByteArray): InferenceOutput.Builder
A byte array that holds input data. The inputs should be in the same order as inputs of the model.
For LiteRT, this field is a serialized Map that is mapped to outputs of runForMultipleInputsOutputs: https://www.tensorflow.org/lite/api_docs/java/org/tensorflow/lite/InterpreterApi#parameters_9
For ExecuTorch model, this field is a serialized EValue array.
Parameters | |
---|---|
value |
ByteArray: This value cannot be null . |
Return | |
---|---|
InferenceOutput.Builder |
This value cannot be null . |
setDataOutputs
fun setDataOutputs(value: MutableMap<Int!, Any!>): InferenceOutput.Builder
Note: use InferenceOutput.Builder.setData(byte[])
instead.
A map mapping output indices to multidimensional arrays of output.
For TFLite, this field is mapped to outputs of runForMultipleInputsOutputs: https://www.tensorflow.org/lite/api_docs/java/org/tensorflow/lite/InterpreterApi#parameters_9
Parameters | |
---|---|
value |
MutableMap<Int!, Any!>: This value cannot be null . |
Return | |
---|---|
InferenceOutput.Builder |
This value cannot be null . |