rec_en_lite_train.yml 1.2 KB
Newer Older
T
tink2123 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Global:
  algorithm: CRNN
  use_gpu: true
  epoch_num: 500
  log_smooth_window: 20
  print_batch_step: 10
  save_model_dir: ./output/en_number
  save_epoch_step: 3
  eval_batch_step: 2000
  train_batch_size_per_card: 256
  test_batch_size_per_card: 256
  image_shape: [3, 32, 320]
  max_text_length: 30
  character_type: ch
  character_dict_path: ./ppocr/utils/ic15_dict.txt
  loss_type: ctc
  distort: false
  use_space_char: false
T
tink2123 已提交
19
  reader_yml: ./configs/rec/multi_languages/rec_en_reader.yml
T
tink2123 已提交
20 21 22 23 24 25 26 27 28 29 30 31
  pretrain_weights:
  checkpoints:
  save_inference_dir:
  infer_img:

Architecture:
  function: ppocr.modeling.architectures.rec_model,RecModel

Backbone:
  function: ppocr.modeling.backbones.rec_mobilenet_v3,MobileNetV3
  scale: 0.5
  model_name: small
T
tink2123 已提交
32
  small_stride: [1, 2, 2, 2]
T
tink2123 已提交
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

Head:
  function: ppocr.modeling.heads.rec_ctc_head,CTCPredict
  encoder_type: rnn
  SeqRNN:
    hidden_size: 48
    
Loss:
  function: ppocr.modeling.losses.rec_ctc_loss,CTCLoss

Optimizer:
  function: ppocr.optimizer,AdamDecay
  l2_decay: 0.00001
  base_lr: 0.001
  beta1: 0.9
  beta2: 0.999
  decay:
    function: cosine_decay_warmup
    warmup_minibatch: 1000
    step_each_epoch: 6530
    total_epoch: 500