1 write to PredictedAnswersBuffer
Microsoft.ML.TorchSharp (1)
Roberta\QATrainer.cs (1)
894
PredictedAnswersBuffer
= new ReadOnlyMemory<char>[maxLength];
4 references to PredictedAnswersBuffer
Microsoft.ML.TorchSharp (4)
Roberta\QATrainer.cs (4)
815
var editor = VBufferEditor.Create(ref dst, outputCacher.
PredictedAnswersBuffer
.Length);
817
for (var i = 0; i < outputCacher.
PredictedAnswersBuffer
.Length; i++)
819
editor.Values[i] = outputCacher.
PredictedAnswersBuffer
[i];
927
outputCache.
PredictedAnswersBuffer
[index] = new ReadOnlyMemory<char>(_parent.Tokenizer.Decode(_parent.Tokenizer.RobertaModel().ConvertOccurrenceRanksToIds(contextIds).ToArray().AsSpan(predictStart - questionLength - 2, predictEnd - predictStart).ToArray()).Trim().ToCharArray());