File size: 1,221 Bytes
3430b27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{
  "model_type": "resnet",
  "model_name": "Resnet18_pnuemonia_binaryclassification",
  "architecture": "resnet18",
  "task": "image-classification",
  "num_labels": 2,
  "label2id": {
    "Normal": 0,
    "Pneumonia": 1
  },
  "id2label": {
    "0": "Normal",
    "1": "Pneumonia"
  },
  "input_size": [224, 224],
  "pretrained": true,
  "weights": "models.ResNet18_Weights.DEFAULT",
  "classifier_dropout": 0.5,
  "batch_size": 512,
  "epochs": 25,
  "optimizer": "AdamW",
  "optimizer_params": {
    "lr": 1e-4,
    "betas": [0.9, 0.999],
    "eps": 1e-8,
    "weight_decay": 1e-4
  },
  "scheduler": {
    "type": "OneCycleLR",
    "max_lr": [1e-4, 1e-4, 1e-4, 1e-4, 1e-4, 1e-3],
    "epochs": 25,
    "pct_start": 0.3,
    "anneal_strategy": "cos"
  },
  "loss_function": "FocalLoss",
  "focal_loss_params": {
    "alpha": 1,
    "gamma": 2
  },
  "augmentation": {
    "resize": [224, 224],
    "random_flip": 0.5,
    "random_affine": {
      "degrees": [-10, 10],
      "translate": [0.1, 0.1],
      "scale": [0.9, 1.1]
    },
    "color_jitter": {
      "brightness": 0.3,
      "contrast": 0.3
    },
    "random_blur": 0.2,
    "random_erasing": 0.2
  },
  "early_stopping_patience": 5,
  "device": "cuda"
}