訓練範例輸出內容.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)

訓練範例位元組陣列清單。

繼承方法

公用建構函式

公用方法

addResumToken

public TrainingExampleOutput.Builder addResumptionToken (byte[] value)

參數
value byte:此值不能為 null

傳回
TrainingExampleOutput.Builder 此值不能為 null

另請參閱:

新增訓練範例

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,以便支援繼續作業。resumToken 的長度應與 trainSample 相符。

參數
value List:此值不能為 null

傳回
TrainingExampleOutput.Builder 此值不能為 null

set 訓練範例

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

訓練範例位元組陣列清單。根據預設,格式為二進位進階 tf.Example proto。範例大小上限為 50 KB,以免達到 Binder IPC 大小限制。

參數
value List:此值不能為 null

傳回
TrainingExampleOutput.Builder 此值不能為 null