1 write to Zeros
Microsoft.ML.TorchSharp (1)
Roberta\Models\RobertaModel.cs (1)
44
Zeros
= Enumerable.Repeat(0, options.MaxSequenceLength).ToArray();
5 references to Zeros
Microsoft.ML.TorchSharp (5)
Roberta\Models\RobertaModel.cs (5)
116
var position = torch.tensor(DataUtils.Concat<int>(Positions.AsSpan(0, allSize),
Zeros
.AsSpan(0, size - allSize)),
118
var segment = questionSize == size - 1 ? torch.tensor(
Zeros
.AsSpan(0, size).ToArray(), 1, size, dtype: torch.int64, device: device) :
119
torch.tensor(DataUtils.Concat<int>(
Zeros
.AsSpan(0, questionSize + 2), Ones.AsSpan(0, allSize - questionSize - 2),
Zeros
.AsSpan(0, size - allSize)),
121
var attentionMask = torch.tensor(DataUtils.Concat<int>(
Zeros
.AsSpan(0, allSize), NegBillionPad.AsSpan(0, size - allSize)),