1 write to attention_biases
Microsoft.ML.TorchSharp (1)
AutoFormerV2\Attention.cs (1)
91this.attention_biases = nn.Parameter(torch.zeros(numHeads, attentionOffsets.Count));
2 references to attention_biases
Microsoft.ML.TorchSharp (2)
AutoFormerV2\Attention.cs (2)
116var attn = (torch.matmul(q, k.transpose(-2, -1)) * this.scale) + this.attention_biases[RangeUtil.ToTensorIndex(..), this.attention_bias_idxs]; 145attention_biases.Dispose();