File size: 2,621 Bytes
8a3b38e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
    "framework": "pytorch",

    "task": "ocr-recognition",

    "model": {
        "type": "ofa",
        "beam_search": {
            "beam_size": 5,
            "max_len_b": 64,
            "min_len": 1,
            "no_repeat_ngram_size": 0
        },
        "seed": 7,
        "max_src_length": 128,
        "language": "zh",
        "prompt": "图片上的文字是什么?",
        "gen_type": "generation",
        "patch_image_size": 480,
        "max_image_size": 480,
        "is_document": false,
        "imagenet_default_mean_and_std": false
    },
    "pipeline": {
        "type": "ofa-ocr-recognition"
    },
    "dataset": {
        "column_map": {
            "text": "text",
            "image": "image"
        }
    },
    "train": {
        "work_dir": "/tmp",
        "max_epochs": 1,
        "use_fp16": false,
        "dataloader": {
            "batch_size_per_gpu": 4,
            "workers_per_gpu": 0
        },
        "lr_scheduler": {
            "name": "polynomial_decay",
            "warmup_proportion": 0.01,
            "lr_end": 1e-07
        },
        "lr_scheduler_hook": {
            "type": "LrSchedulerHook",
            "by_epoch": false
        },
        "optimizer": {
            "type": "AdamW",
            "lr": 5e-05,
            "weight_decay": 0.01
        },
        "optimizer_hook": {
            "type": "TorchAMPOptimizerHook",
            "cumulative_iters": 1,
            "grad_clip": {
                "max_norm": 1.0,
                "norm_type": 2
            },
            "loss_keys": "loss"
        },
        "criterion": {
            "name": "AdjustLabelSmoothedCrossEntropyCriterion",
            "constraint_range": null,
            "drop_worst_after": 0,
            "drop_worst_ratio": 0.0,
            "ignore_eos": false,
            "ignore_prefix_size": 0,
            "label_smoothing": 0.1,
            "reg_alpha": 1.0,
            "report_accuracy": false,
            "sample_patch_num": 196,
            "sentence_avg": false,
            "use_rdrop": true
        },
        "hooks": [{
                "type": "BestCkptSaverHook",
                "metric_key": "accuracy",
                "interval": 100
            },
            {
                "type": "TextLoggerHook",
                "interval": 1
            },
            {
                "type": "IterTimerHook"
            }
        ]
    },
    "evaluation": {
        "dataloader": {
            "batch_size_per_gpu": 4,
            "workers_per_gpu": 0
        },
        "metrics": [{
            "type": "accuracy"
        }]
    },
    "preprocessor": []
}