|
36 | 36 |
|
37 | 37 | @click.command('pretrain') |
38 | 38 | @click.pass_context |
39 | | -@click.option('-B', '--batch-size', type=int, help='batch sample size') |
40 | | -@click.option('--pad', 'padding', type=int, help='Left and right padding around lines') |
41 | | -@click.option('-o', '--output', 'checkpoint_path', type=click.Path(), help='Output checkpoint path') |
42 | | -@click.option('-s', '--spec', help='VGSL spec of the network to train.') |
43 | | -@click.option('-i', '--load', type=click.Path(exists=True, readable=True), |
| 39 | +@click.option('-B', |
| 40 | + '--batch-size', |
| 41 | + type=int, |
| 42 | + help='batch sample size') |
| 43 | +@click.option('--pad', |
| 44 | + 'padding', |
| 45 | + type=int, |
| 46 | + help='Left and right padding around lines') |
| 47 | +@click.option('-o', |
| 48 | + '--output', |
| 49 | + 'checkpoint_path', |
| 50 | + type=click.Path(), help='Output checkpoint path') |
| 51 | +@click.option('-s', |
| 52 | + '--spec', |
| 53 | + help='VGSL spec of the network to train.') |
| 54 | +@click.option('-i', |
| 55 | + '--load', |
| 56 | + type=click.Path(exists=True, readable=True), |
44 | 57 | help='Load existing file to continue training') |
45 | 58 | @click.option('-F', |
46 | 59 | '--freq', |
|
98 | 111 | type=int, |
99 | 112 | help='Minimal number of validation runs between LR reduction for reduceonplateau LR schedule.') |
100 | 113 | @click.option('--cos-max', |
101 | | - 'cos_max_t', |
| 114 | + 'cos_t_max', |
102 | 115 | type=int, |
103 | 116 | help='Epoch of minimal learning rate for cosine LR scheduler.') |
104 | 117 | @click.option('--cos-min-lr', |
|
108 | 121 | '--partition', |
109 | 122 | type=float, |
110 | 123 | help='Ground truth data partition ratio between train/validation set') |
111 | | -@click.option('--fixed-splits/--ignore-fixed-splits', default=False, |
112 | | - help='Whether to honor fixed splits in binary datasets.') |
113 | | -@click.option('-t', '--training-files', default=None, multiple=True, |
| 124 | +@click.option('-t', '--training-files', 'training_data', multiple=True, |
114 | 125 | callback=_validate_manifests, type=click.File(mode='r', lazy=True), |
115 | 126 | help='File(s) with additional paths to training data') |
116 | | -@click.option('-e', '--evaluation-files', default=None, multiple=True, |
| 127 | +@click.option('-e', '--evaluation-files', 'evaluation_data', multiple=True, |
117 | 128 | callback=_validate_manifests, type=click.File(mode='r', lazy=True), |
118 | 129 | help='File(s) with paths to evaluation data. Overrides the `-p` parameter') |
119 | | -@click.option('--load-hyper-parameters/--no-load-hyper-parameters', default=False, |
120 | | - help='When loading an existing model, retrieve hyperparameters from the model') |
121 | 130 | @click.option('-f', '--format-type', type=click.Choice(['path', 'xml', 'alto', 'page', 'binary']), |
122 | 131 | help='Sets the training data format. In ALTO and PageXML mode all ' |
123 | 132 | 'data is extracted from xml files containing both line definitions and a ' |
|
0 commit comments