class_docstr: A `Highway layer <https://arxiv.org/abs/1505.00387>`_.
  Adopted from the AllenNLP implementation.
class_docstr_tok: ["A","`","Highway","layer","<","https",":","\/\/arxiv.org\/abs\/1505.00387",">","`","_",".","Adopted","from","the","AllenNLP","implementation","."]
code: def __init__(self, input_dim: int, num_layers: int = 1):
      super(Highway, self).__init__()
      self.input_dim = input_dim
      self.layers = nn.ModuleList(
          [
              nn.Linear(input_dim, input_dim * 2)
              for _ in range(num_layers)
          ]
      )
      self.activation = nn.ReLU()
  
      self.reset_parameters()
  
file_path: fairseq/fairseq/modules/character_token_embedder.py
imports: import logging
  from typing import List, Tuple
  import torch
  import torch.nn.functional
  from fairseq.data import Dictionary
  from torch import nn
label_desc: Use image node_id 1 to create a new Highway object from inherited base classes: torch.nn with example: obj = Highway(input_dim, num_layers)