TrainingExampleOutput.Builder

public static final class TrainingExampleOutput.Builder
extends Object

java.lang.Object
   ↳ android.adservices.ondevicepersonalization.TrainingExampleOutput.Builder


TrainingExampleOutput 的构建器

摘要

公共构造函数

Builder()

公共方法

TrainingExampleOutput.Builder addResumptionToken(byte[] value)
TrainingExampleOutput.Builder addTrainingExample(byte[] value)
TrainingExampleOutput build()

构建实例。

TrainingExampleOutput.Builder setResumptionTokens(List<byte[]> value)

与训练示例对应的恢复令牌字节数组列表。

TrainingExampleOutput.Builder setTrainingExamples(List<byte[]> value)

训练示例字节数组的列表。

继承的方法

公共构造函数

公共方法

addResumptionToken

public TrainingExampleOutput.Builder addResumptionToken (byte[] value)

参数
value byte:此值不能为 null

返回值
TrainingExampleOutput.Builder 此值不能为 null

addTrainingExample

public TrainingExampleOutput.Builder addTrainingExample (byte[] value)

参数
value byte:此值不能为 null

返回值
TrainingExampleOutput.Builder 此值不能为 null

build

public TrainingExampleOutput build ()

构建实例。调用这个方法后,不应触碰此构建器!

返回值
TrainingExampleOutput 此值不能为 null

setResumptionTokens

public TrainingExampleOutput.Builder setResumptionTokens (List<byte[]> value)

与训练示例对应的恢复令牌字节数组列表。最后一个 所处理样本的相应恢复令牌将被传递至 TrainingExampleInput 以支持恢复。resumptionTokens 的长度 匹配 trainingExample。

参数
value List:此值不能为 null

返回值
TrainingExampleOutput.Builder 此值不能为 null

setTrainingExample

public TrainingExampleOutput.Builder setTrainingExamples (List<byte[]> value)

训练示例字节数组的列表。格式为二进制 tf.Example proto。示例大小上限为 50KB,以避免 Binder IPC 大小限制。

参数
value List:此值不能为 null

返回值
TrainingExampleOutput.Builder 此值不能为 null