Skip to content
Snippets Groups Projects

Add a new configuration to tests the training command

Merged Manon Blanco requested to merge add-test-configuration into main
3 files
+ 119
107
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 105
0
 
{
 
"dataset": {
 
"datasets": {
 
"training": "tests/data/training/training_dataset"
 
},
 
"train": {
 
"name": "training-train",
 
"datasets": [
 
["training", "train"]
 
]
 
},
 
"val": {
 
"training-val": [
 
["training", "val"]
 
]
 
},
 
"test": {
 
"training-test": [
 
["training", "test"]
 
]
 
},
 
"max_char_prediction": 30,
 
"tokens": null
 
},
 
"model": {
 
"transfered_charset": true,
 
"additional_tokens": 1,
 
"encoder": {
 
"dropout": 0.5,
 
"nb_layers": 5
 
},
 
"h_max": 500,
 
"w_max": 1000,
 
"decoder": {
 
"l_max": 15000,
 
"dec_num_layers": 8,
 
"dec_num_heads": 4,
 
"dec_res_dropout": 0.1,
 
"dec_pred_dropout": 0.1,
 
"dec_att_dropout": 0.1,
 
"dec_dim_feedforward": 256,
 
"attention_win": 100,
 
"enc_dim": 256
 
}
 
},
 
"training": {
 
"data": {
 
"batch_size": 2,
 
"load_in_memory": true,
 
"worker_per_gpu": 4,
 
"preprocessings": [
 
{
 
"type": "max_resize",
 
"max_width": 2000,
 
"max_height": 2000
 
}
 
],
 
"augmentation": true
 
},
 
"device": {
 
"use_ddp": false,
 
"ddp_port": "20027",
 
"use_amp": true,
 
"nb_gpu": 0,
 
"force": "cpu"
 
},
 
"metrics": {
 
"train": [
 
"loss_ce",
 
"cer",
 
"wer",
 
"wer_no_punct"
 
],
 
"eval": [
 
"cer",
 
"wer",
 
"wer_no_punct"
 
]
 
},
 
"validation": {
 
"eval_on_valid": true,
 
"eval_on_valid_interval": 2,
 
"set_name_focus_metric": "training-val"
 
},
 
"output_folder": "dan_trained_model",
 
"gradient_clipping": {},
 
"max_nb_epochs": 4,
 
"load_epoch": "last",
 
"optimizers": {
 
"all": {
 
"args": {
 
"lr": 0.0001,
 
"amsgrad": false
 
}
 
}
 
},
 
"lr_schedulers": null,
 
"label_noise_scheduler": {
 
"min_error_rate": 0.2,
 
"max_error_rate": 0.2,
 
"total_num_steps": 5e4
 
},
 
"transfer_learning": null
 
}
 
}
Loading