summaryrefslogtreecommitdiff
path: root/training/conf/network/vit_lines.yaml
blob: a8045c2238a8086985ab1d5a7ad7d8e3d93bc16a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
_target_: text_recognizer.network.transformer.transformer.Transformer
dim: &dim 768
num_classes: &num_classes 57
encoder:
  _target_: text_recognizer.network.transformer.vit.Vit
  image_height: 56
  image_width: 1024
  patch_height: 56
  patch_width: 8
  dim: *dim
  encoder:
    _target_: text_recognizer.network.transformer.encoder.Encoder
    dim: *dim
    heads: 16
    dim_head: 64
    ff_mult: 4
    depth: 6
    dropout_rate: 0.
    use_rotary_emb: true
    one_kv_head: false
  channels: 1
  patch_dropout: 0.4
decoder:
  _target_: text_recognizer.network.transformer.decoder.Decoder
  dim: *dim
  ff_mult: 4
  heads: 12
  dim_head: 64
  depth: 6
  dropout_rate: 0.
  one_kv_head: false
token_embedding:
  _target_: "text_recognizer.network.transformer.embedding.token.\
    TokenEmbedding"
  num_tokens: *num_classes
  dim: *dim
  use_l2: true
tie_embeddings: false
pad_index: 3