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