1 write to KProjection
Microsoft.ML.TorchSharp (1)
NasBert\Modules\MultiHeadAttention.cs (1)
92
KProjection
= torch.nn.Linear(_kDim, _embeddingDim, _addBiasProj);
7 references to KProjection
Microsoft.ML.TorchSharp (7)
NasBert\Modules\MultiHeadAttention.cs (7)
113
ModelUtils.InitXavierUniform(
KProjection
.weight, 1.0 / Math.Sqrt(2.0));
119
ModelUtils.InitXavierUniform(
KProjection
.weight);
128
ModelUtils.InitConstant(
KProjection
.bias, 0);
337
k =
KProjection
.forward(query);
349
k =
KProjection
.forward(key);
356
k =
KProjection
.forward(key);
390
KProjection
.Dispose();