NRTRModalityTransform¶
- class mmocr.models.textrecog.NRTRModalityTransform(in_channels=3, init_cfg=[{'type': 'Kaiming', 'layer': 'Conv2d'}, {'type': 'Uniform', 'layer': 'BatchNorm2d'}])[source]¶
Modality transform in NRTR.
- Parameters
- Return type
- forward(x)[source]¶
Backbone forward.
- Parameters
x (torch.Tensor) – Image tensor of shape \((N, C, W, H)\). W, H is the width and height of image.
- Returns
Output tensor.
- Return type
Tensor