Programming, Artificial Intelligence, Machine Learning, Data Science, Python.
stacked using nn.ModuleList. An output linear layer (output_linear) is used to project the decoder output to the vocabulary size. A softmax layer (output_softmax) is applied to obtain the final output probabilities. In the forward method of TransformerDecoder: The input indices are passed through