class_docstr: To go on top of a RNNCore module and create a Language Model.
class_docstr_tok: ["To","go","on","top","of","a","RNNCore","module","and","create","a","Language","Model","."]
code: def __init__(
      self,
      n_out: int,  # Number of output channels
      n_hid: int,  # Number of features in encoder last layer output
      output_p: float = 0.1,  # Input dropout probability
      tie_encoder: nn.Module = None,  # If module is supplied will tie decoder weight to `tie_encoder.weight`
      bias: bool = True,  # If `False` the layer will not learn additive bias
  ):
      self.decoder = nn.Linear(n_hid, n_out, bias=bias)
      self.decoder.weight.data.uniform_(-self.initrange, self.initrange)
      self.output_dp = RNNDropout(output_p)
      if bias:
          self.decoder.bias.data.zero_()
      if tie_encoder:
          self.decoder.weight = tie_encoder.weight
  
imports: from __future__ import annotations
  from ...data.all import *
  from ..core import *
  from .awdlstm import *
label_desc: Use image node_id 1 to create a new LinearDecoder object from inherited base classes: Module with example: obj = LinearDecoder(n_out, n_hid, output_p, tie_encoder, bias)