Yvonnefanf
resnet18 cifar10 with dropout
7967ba7
raw
history blame
1.94 kB
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",
}
}