File size: 1,937 Bytes
7967ba7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from torchvision import transforms as transforms
config = {
    "SETTING": "abnormal",
    "CLASSES": ["plane", "car", "bird", "cat", "deer", "dog", "frog", "horse", "ship", "truck"], 
    "DATASET": "cifar10",
    "EPOCH_START": 1,
    "EPOCH_END": 200,
    "EPOCH_PERIOD": 1,
    "GPU":0,
    "TRAINING": {
        "NET": "resnet18_with_dropout",
        "transform_tr": transforms.Compose([
            transforms.RandomCrop(size=32, padding=4),
            transforms.RandomHorizontalFlip(),
            transforms.ToTensor(),
            transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2470, 0.2435, 0.2616))]),
        "transform_te": transforms.Compose([transforms.ToTensor(),
                                            transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2470, 0.2435, 0.2616))]),
        "loader_tr_args": {"batch_size": 128, "num_workers": 1},
        "loader_te_args": {"batch_size": 1000, "num_workers": 1},
        "optimizer_args": {"lr": 0.1, "momentum": 0.9, "weight_decay": 5e-4},
        "num_class": 10,
        "train_num": 50000,
        "test_num": 10000,
        "milestone":[160]
    },
    "VISUALIZATION":{
        # "RESUME_SEG":4,
        # "SEGMENTS":[(1, 60),(60,155),(155,200)],
        # "SEGMENTS": [(1, 18), (18, 101), (101, 165), (165, 200)],
        "S_LAMBDA":1.,
        "PREPROCESS":0,
        "BOUNDARY":{
            "B_N_EPOCHS": 0,#5
            "L_BOUND":0.6, # 
        },
        "INIT_NUM":300,
        # TODO
        "ALPHA":0,
        "BETA":0.1,
        "MAX_HAUSDORFF":0.4,
        # TODO
        "LAMBDA": 10.0,
        "HIDDEN_LAYER":4,
        "ENCODER_DIMS": [512,256,256,256,256,2],
        "DECODER_DIMS": [2,256,256,256,256,512],
        "N_NEIGHBORS":15,
        "MAX_EPOCH": 20,
        "S_N_EPOCHS": 5,
        "T_N_EPOCHS": 100,
        "PATIENT": 3,
        "RESOLUTION":300,
        "VIS_MODEL_NAME": "vis",
        "EVALUATION_NAME": "evalution",
    }
}