mmocr/configs/textrecog/satrn/satrn_shallow-small_5e_st_m...

24 lines
547 B
Python
Raw Normal View History

_base_ = ['satrn_shallow_5e_st_mj.py']
[Feature] Add Satrn (#405) * Add SATRN * Create satrn_small_academic.py * Update README.md * change config name * Update mmocr/models/textrecog/backbones/shallow_cnn.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update configs/textrecog/satrn/satrn_academic.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update configs/textrecog/satrn/satrn_small.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update shallow_cnn.py * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update test_ocr_encoder.py * change keep_aspect_ratio=False * Update transformer_layer.py * Update configs/textrecog/satrn/satrn_small.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update configs/textrecog/satrn/satrn_academic.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update transformer_layer.py * Apply suggestions from code review Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update transformer_layer.py * update satrn readme * add satrn to ocr.py * add satrn_sm and fix configs * add a test for config * add copyright info * use mmocr registry Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
2021-08-19 22:02:58 +08:00
model = dict(
backbone=dict(type='ShallowCNN', input_channels=3, hidden_dim=256),
encoder=dict(
2022-06-13 15:00:39 +08:00
type='SATRNEncoder',
[Feature] Add Satrn (#405) * Add SATRN * Create satrn_small_academic.py * Update README.md * change config name * Update mmocr/models/textrecog/backbones/shallow_cnn.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update configs/textrecog/satrn/satrn_academic.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update configs/textrecog/satrn/satrn_small.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update shallow_cnn.py * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update test_ocr_encoder.py * change keep_aspect_ratio=False * Update transformer_layer.py * Update configs/textrecog/satrn/satrn_small.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update configs/textrecog/satrn/satrn_academic.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update transformer_layer.py * Apply suggestions from code review Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update transformer_layer.py * update satrn readme * add satrn to ocr.py * add satrn_sm and fix configs * add a test for config * add copyright info * use mmocr registry Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
2021-08-19 22:02:58 +08:00
n_layers=6,
n_head=8,
d_k=256 // 8,
d_v=256 // 8,
d_model=256,
n_position=100,
d_inner=256 * 4,
dropout=0.1),
decoder=dict(
type='NRTRDecoder',
[Feature] Add Satrn (#405) * Add SATRN * Create satrn_small_academic.py * Update README.md * change config name * Update mmocr/models/textrecog/backbones/shallow_cnn.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update configs/textrecog/satrn/satrn_academic.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update configs/textrecog/satrn/satrn_small.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update shallow_cnn.py * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update test_ocr_encoder.py * change keep_aspect_ratio=False * Update transformer_layer.py * Update configs/textrecog/satrn/satrn_small.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update configs/textrecog/satrn/satrn_academic.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update mmocr/models/textrecog/layers/transformer_layer.py Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update transformer_layer.py * Apply suggestions from code review Co-authored-by: Tong Gao <gaotongxiao@gmail.com> * Update transformer_layer.py * update satrn readme * add satrn to ocr.py * add satrn_sm and fix configs * add a test for config * add copyright info * use mmocr registry Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
2021-08-19 22:02:58 +08:00
n_layers=6,
d_embedding=256,
n_head=8,
d_model=256,
d_inner=256 * 4,
d_k=256 // 8,
2022-06-13 15:00:39 +08:00
d_v=256 // 8))