class_docstr: CNN based representation of a document.
code: def forward(
      self, embedded_tokens: torch.Tensor, *args
  ) -> torch.Tensor:
      # embedded_tokens of size (N,W,D)
      rep = embedded_tokens
      # nn.Conv1d expects a tensor of dim (batch_size x embed_dim x seq_len)
      rep = rep.transpose(1, 2)
      rep = [self.conv_and_pool(rep, conv) for conv in self.convs]
      rep = self.dropout(torch.cat(rep, 1))  # (N,len(Ks)*Co)
      return rep
  
file_path: pytext/pytext/models/representations/docnn.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from pytext.config import ConfigBase
  from pytext.config.module_config import CNNParams, PoolingType
  from pytext.utils.usage import log_class_usage
  from .representation_base import RepresentationBase
label_desc: Use image node_id 2 for calling the DocNNRepresentation obj's underlying member method code with example usage: obj.forward(embedded_tokens) and returns: rep