-
Notifications
You must be signed in to change notification settings - Fork 10
/
config.json
48 lines (47 loc) · 1.27 KB
/
config.json
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
{
"name": "Email-Spam",
"n_gpu": 2,
"arch": {
"type": "BertClassifier",
"args": {"out_dim": 2,
"seq_length": 128}
},
"train_data_loader": {
"type": "EmailSpamTrainDataLoader",
"args": {
"data_dir": "data/email_spam",
"vocab_from_pretrained": "bert-base-uncased",
"seq_length": 128,
"batch_size": 32,
"shuffle": true,
"validation_split": 0.15
}
},
"test_data_loader": {
"type": "EmailSpamTestDataLoader",
"args": {
"data_dir": "data/email_spam",
"vocab_from_pretrained": "bert-base-uncased",
"seq_length": 128,
"batch_size": 32,
"shuffle": true
}
},
"optimizer": {
"type": "Adam",
"args": {"lr": 2e-6, "weight_decay": 0, "amsgrad": true}
},
"loss": "cross_entropy",
"metrics": ["accuracy"],
"lr_scheduler": {"type": "StepLR", "args": {"step_size": 10, "gamma": 0.1}},
"trainer": {
"epochs": 3,
"save_dir": "saved/",
"save_period": 1,
"verbosity": 2,
"monitor": "min val_loss",
"early_stop": 10,
"tensorboardX": true
},
"test_methods": ["predict_classes_from_batch"]
}