class_docstr: Modality transform in NRTR.
  
  Args:
      in_channels (int): Input channel of image. Defaults to 3.
      init_cfg (dict or list[dict], optional): Initialization configs.
docstr: Backbone forward.
  
  Args:
      x (torch.Tensor): Image tensor of shape :math:`(N, C, W, H)`. W, H
          is the width and height of image.
  Return:
      Tensor: Output tensor.
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """Backbone forward.
  
      Args:
          x (torch.Tensor): Image tensor of shape :math:`(N, C, W, H)`. W, H
              is the width and height of image.
      Return:
          Tensor: Output tensor.
      """
      x = self.conv_1(x)
      x = self.relu_1(x)
      x = self.bn_1(x)
  
      x = self.conv_2(x)
      x = self.relu_2(x)
      x = self.bn_2(x)
  
      n, c, h, w = x.size()
  
      x = x.permute(0, 3, 2, 1).contiguous().view(n, w, h * c)
  
      x = self.linear(x)
  
      x = x.permute(0, 2, 1).contiguous().view(n, -1, 1, w)
  
      return x
  
file_path: mmocr/mmocr/models/textrecog/backbones/nrtr_modality_transformer.py
imports: from typing import Dict, Optional, Sequence, Union
  import torch
  import torch.nn
  from mmengine.model import BaseModule
  from mmocr.registry import MODELS
label_desc: Use image node_id 2 for calling the NRTRModalityTransform obj's underlying member method code with example usage: obj.forward(x) and returns: x