1 write to TokenEmbedding
Microsoft.ML.TorchSharp (1)
NasBert\Models\NasBertEncoder.cs (1)
85TokenEmbedding = torch.nn.Embedding(vocabSize, embedSize, paddingIdx);
6 references to TokenEmbedding
Microsoft.ML.TorchSharp (6)
NasBert\Models\NasBertEncoder.cs (6)
47public Parameter TokenEmbeddingMatrix => TokenEmbedding.weight; 98ModelUtils.InitNormal(TokenEmbedding.weight, mean: 0.0, std: 0.02); 99ModelUtils.InitZeros(TokenEmbedding.weight[paddingIdx]); 131ModelUtils.FreezeModuleParams(TokenEmbedding); 199var x = TokenEmbedding.forward(tokens); 294TokenEmbedding.Dispose();