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