class_docstr: CNN based representation of a document.
class_docstr_tok: ["CNN","based","representation","of","a","document","."]
code: def forward(
      self,
      embedded_tokens: torch.Tensor,
      src_tokens: Tensor,
      src_lengths: Tensor,
  ) -> torch.Tensor:
      x = self.embed_scale * embedded_tokens
      if not self.no_token_positional_embeddings:
          x = self.pos_embed(x, src_tokens)
      else:
          x = self.project_in_dim(x)
  
      x = self.embed_layer_norm(x)
      x = self.dropout(x)
  
      # B x T x C -> T x B x C
      x = x.transpose(0, 1)
  
      # Compute padding mask
      encoder_padding_mask = src_tokens.eq(self.padding_idx)  # B x T
      if (
          not encoder_padding_mask.any()
      ):  # Setting to None helps us avoid some masking operations later.
          # Different name is used to avoid some torchscript type checks
          encoder_mask = None
      else:
          encoder_mask = encoder_padding_mask
  
      # Encoder layers
      for _, layer in enumerate(self.layers):
          x = layer(x, encoder_mask)
  
      if self.normalize:
          x = self.layer_norm(x)
  
      x = pool(
          self.pooling_type, x.transpose(0, 1), encoder_padding_mask
      )
      return x
  
imports: import math
  from typing import Dict, List, Optional
  import torch
  import torch.nn
  from fairseq.modules import LayerNorm, PositionalEmbedding
  from pytext.models.module import create_module
  from pytext.models.seq_models.base import PlaceholderIdentity
  from pytext.models.seq_models.conv_encoder import ConvEncoderConfig, LightConvEncoderLayer
  from pytext.models.seq_models.positional import PostionalEmbedCombine, PostionalEmbedType, SinusoidalPositionalEmbedding
  from pytext.utils.usage import log_class_usage
  from torch import Tensor
  from torch.nn import Linear
  from .representation_base import RepresentationBase
label_desc: Use image node_id 2 for calling the LightConvRepresentation obj's underlying member method code with example usage: obj.forward(embedded_tokens, src_tokens, src_lengths) and returns: x