class_docstr: <a id="Generator"></a>
  
  ## Generator
  
  This predicts the tokens and gives the lof softmax of those.
  You don't need this if you are using `nn.CrossEntropyLoss`.
code: def __init__(self, n_vocab: int, d_model: int):
      super().__init__()
      self.projection = nn.Linear(d_model, n_vocab)
  
imports: import math
  import torch
  import torch.nn
  from labml_nn.utils import clone_module_list
  from .feed_forward import FeedForward
  from .mha import MultiHeadAttention
  from .positional_encoding import get_positional_encoding
label_desc: Use image node_id 1 to create a new Generator object from inherited base classes: nn with example: obj = Generator(n_vocab, d_model)