1 write to AttentionHeadSize
Microsoft.ML.TorchSharp (1)
Roberta\Modules\AttentionSelf.cs (1)
31
AttentionHeadSize
= (int)hiddenSize / numAttentionHeads;
4 references to AttentionHeadSize
Microsoft.ML.TorchSharp (4)
Roberta\Modules\AttentionSelf.cs (4)
32
if (NumAttentionHeads *
AttentionHeadSize
!= hiddenSize)
57
queryLayer.div_(Math.Sqrt(
AttentionHeadSize
));
69
var contextShape = DataUtils.Concat<long>(contextLayer.shape.AsSpan(0, contextLayer.shape.Length - 2), NumAttentionHeads *
AttentionHeadSize
);
80
var newShape = DataUtils.Concat<long>(x.shape.AsSpan(0, x.shape.Length - 1), NumAttentionHeads,
AttentionHeadSize
);