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