Adaptive2DPositionalEncoding¶
- class mmocr.models.textrecog.Adaptive2DPositionalEncoding(d_hid=512, n_height=100, n_width=100, dropout=0.1, init_cfg=[{'type': 'Xavier', 'layer': 'Conv2d'}])[源代码]¶
Implement Adaptive 2D positional encoder for SATRN, see `SATRN.
<https://arxiv.org/abs/1910.04396>`_ Modified from https://github.com/Media-Smart/vedastr Licensed under the Apache License, Version 2.0 (the “License”);
- 参数
d_hid (int) – Dimensions of hidden layer. Defaults to 512.
n_height (int) – Max height of the 2D feature output. Defaults to 100.
n_width (int) – Max width of the 2D feature output. Defaults to 100.
dropout (float) – Dropout rate. Defaults to 0.1.
init_cfg (dict or list[dict], optional) – Initialization configs. Defaults to [dict(type=’Xavier’, layer=’Conv2d’)]
- 返回类型