共用方式為


BpeTrainer 類別

定義

負責將 Bpe 模型定型的 Bpe 定型者。

public sealed class BpeTrainer : Microsoft.ML.Tokenizers.Trainer
type BpeTrainer = class
    inherit Trainer
Public NotInheritable Class BpeTrainer
Inherits Trainer
繼承
BpeTrainer

建構函式

BpeTrainer()

使用預設值建構新的 BpeTrainer 物件。

BpeTrainer(IEnumerable<AddedToken>, Int32, Int32, ReportProgress, Nullable<Int32>, HashSet<Char>, String, String)

建構新的 BpeTrainer 物件。

屬性

ContinuingSubwordPrefix

取得要用於不是單字開頭之每個子字的前置詞。

EndOfWordSuffix

取得要用於屬於字尾之每個子字的尾碼。

InitialAlphabet

取得要包含在初始字母中的字元清單,即使訓練資料集中看不到也是如此。 如果字串包含多個字元,則只會保留第一個字元。

LimitAlphabet

取得字母順序中要保留的最大不同字元。

MinFrequency

取得配對應該要合併的最小頻率。

Progress

設定何時需要在定型期間報告進度。

(繼承來源 Trainer)
SpecialTokens

取得模型應該知道的特殊權杖清單。

VocabSize

取得最終詞彙的大小,包括所有標記和字母。

方法

Feed(IEnumerable<String>, Func<String,IEnumerable<String>>)

處理輸入序列,並將結果饋送至模型。

Train(Model)

執行實際的定型,並使用新的詞彙和合併資料來更新輸入模型。

適用於