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)

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

继承的方法

Object clone()

创建并返回此对象的副本。

boolean equals(Object obj)

指示某个其他对象是否“等于”此对象。

void finalize()

当垃圾回收功能确定对某个对象没有更多引用时,由垃圾回收器针对此对象调用该方法。

final Class<?> getClass()

返回此 Object 的运行时类。

int hashCode()

返回对象的哈希代码值。

final void notify()

唤醒正在等待此对象的监控器的单个线程。

final void notifyAll()

唤醒等待此对象监视器的所有线程。

String toString()

返回对象的字符串表示。

final void wait(long timeoutMillis, int nanos)

让当前线程进入等待状态,直到其被唤醒(通常在收到通知或被中断时),或者实际经过了一定的时间为止。

final void wait(long timeoutMillis)

让当前线程进入等待状态,直到其被唤醒(通常在收到通知或被中断时),或者实际经过了一定的时间为止。

final void wait()

让当前线程进入等待状态,直到其被唤醒(通常在收到通知或被中断时)

公共构造函数

公共方法

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 的长度应与 trainingExamples 一致。

参数
value List:此值不能为 null

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

setTrainingExamples

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

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

参数
value List:此值不能为 null

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