TrainingExampleOutput.Builder
public static final class TrainingExampleOutput.Builder
extends Object
java.lang.Object | |
↳ | android.adservices.ondevicepersonalization.TrainingExampleOutput.Builder |
摘要
公共构造函数 | |
---|---|
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 的长度应与 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 。 |