1 write to Tokenizer
Microsoft.ML.TorchSharp (1)
Roberta\QATrainer.cs (1)
215
Tokenizer
= TokenizerExtensions.GetInstance(ch);
5 references to Tokenizer
Microsoft.ML.TorchSharp (5)
Roberta\QATrainer.cs (5)
352
srcTensor = PrepareBatchTensor(ref inputTensors, device: Device,
Tokenizer
.RobertaModel().PadIndex);
404
var contextTokens =
Tokenizer
.EncodeToTokens(contextString, out string normalized);
406
var contextTokenId =
Tokenizer
.RobertaModel().ConvertIdsToOccurrenceRanks(contextTokens.Select(t => t.Id).ToArray());
413
var questionTokenId =
Tokenizer
.EncodeToConverted(question.ToString());
440
EnglishRobertaTokenizer robertaModel =
Tokenizer
as EnglishRobertaTokenizer;