1 write to Embedding
Microsoft.ML.TorchSharp (1)
NasBert\Modules\Embedding\LearnedPositionalEmbedding.cs (1)
26
Embedding
= torch.nn.Embedding(numEmbeddings, embeddingDim, PadPositionIndex);
4 references to Embedding
Microsoft.ML.TorchSharp (4)
NasBert\Modules\Embedding\LearnedPositionalEmbedding.cs (4)
28
ModelUtils.InitNormal(
Embedding
.weight, mean: 0, std: Math.Pow(EmbeddingDim, -0.5));
29
ModelUtils.InitZeros(
Embedding
.weight[PadPositionIndex]);
53
var embedding =
Embedding
.forward(positions);
74
Embedding
.Dispose();