Shortcuts

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
  • in_channels (int) – Input channel of image. Defaults to 3.

  • init_cfg (dict or list[dict], optional) – Initialization configs.

Return type

None

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

Read the Docs v: latest
Versions
latest
stable
v1.0.1
v1.0.0
0.x
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.1
v0.2.0
v0.1.0
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.