Global: use_gpu: True epoch_num: 240 log_smooth_window: 20 print_batch_step: 10 save_model_dir: ./output/rec/can/ save_epoch_step: 1 # evaluation is run every 1105 iterations eval_batch_step: [0, 1105] cal_metric_during_train: True pretrained_model: ./output/rec/can/CAN checkpoints: ./output/rec/can/CAN save_inference_dir: ./inference/rec_d28_can/ use_visualdl: False infer_img: doc/imgs_hme/hme_01.jpeg # for data or label process character_dict_path: ppocr/utils/dict/latex_symbol_dict.txt max_text_length: 36 infer_mode: False use_space_char: False save_res_path: ./output/rec/predicts_can.txt Optimizer: name: Momentum momentum: 0.9 clip_norm_global: 100.0 lr: name: TwoStepCosine learning_rate: 0.01 warmup_epoch: 1 weight_decay: 0.0001 Architecture: model_type: rec algorithm: CAN in_channels: 1 Transform: Backbone: name: DenseNet growthRate: 24 reduction: 0.5 bottleneck: True use_dropout: True input_channel: 1 Head: name: CANHead in_channel: 684 out_channel: 111 max_text_length: 36 ratio: 16 attdecoder: is_train: True input_size: 256 hidden_size: 256 encoder_out_channel: 684 dropout: True dropout_ratio: 0.5 word_num: 111 counting_decoder_out_channel: 111 attention: attention_dim: 512 word_conv_kernel: 1 Loss: name: CANLoss PostProcess: name: SeqLabelDecode character: 111 Metric: name: CANMetric main_indicator: exp_rate Train: dataset: name: HMERDataSet data_dir: ./train_data/CROHME/training/images/ transforms: - DecodeImage: channel_first: False - GrayImageChannelFormat: normalize: True inverse: True - KeepKeys: keep_keys: ['image', 'label'] label_file_list: ["./train_data/CROHME/training/labels.json"] loader: shuffle: True batch_size_per_card: 2 drop_last: True num_workers: 1 collate_fn: DyMaskCollator Eval: dataset: name: HMERDataSet data_dir: ./train_data/CROHME/evaluation/images/ transforms: - DecodeImage: channel_first: False - GrayImageChannelFormat: normalize: True inverse: True - KeepKeys: keep_keys: ['image', 'label'] label_file_list: ["./train_data/CROHME/evaluation/labels.json"] loader: shuffle: False drop_last: False batch_size_per_card: 1 num_workers: 4 collate_fn: DyMaskCollator