class_docstr: Base class for encoders.
docstr: Args:
      src_tokens (LongTensor): tokens in the source language of shape
          `(batch, src_len)`
      src_lengths (LongTensor): lengths of each source sentence of shape
          `(batch)`
docstr_tok: ["Args",":","src_tokens","(","LongTensor",")",":","tokens","in","the","source","language","of","shape","`","(","batch",",","src_len",")","`","src_lengths","(","LongTensor",")",":","lengths","of","each","source","sentence","of","shape","`","(","batch",")","`"]
code: def forward(self, src_tokens, src_lengths=None, **kwargs):
      """
      Args:
          src_tokens (LongTensor): tokens in the source language of shape
              `(batch, src_len)`
          src_lengths (LongTensor): lengths of each source sentence of shape
              `(batch)`
      """
      raise NotImplementedError
  
file_path: fairseq/fairseq/models/fairseq_encoder.py
imports: from typing import Dict, List, NamedTuple, Optional
  import torch
  import torch.nn
  from torch import Tensor
label_desc: Use image node_id 2 for calling the FairseqEncoder obj's underlying member method code with example usage: obj.forward(src_tokens, src_lengths) without return types