forked from corenel/pytorch-adda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.py
58 lines (50 loc) · 1.5 KB
/
params.py
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
"""Params for ADDA."""
# params for dataset and data loader
data_root = "data"
dataset_mean_value = 0.5
dataset_std_value = 0.5
dataset_mean = (dataset_mean_value,)
dataset_std = (dataset_std_value,)
batch_size = 50
image_size = 28
# params for source dataset
# src_dataset = "MNIST"
# src_encoder_restore = "snapshots/ADDA-source-encoder-final.pt"
# src_classifier_restore = "snapshots/ADDA-source-classifier-final.pt"
# src_model_trained = True
# params for lung cancer dataset
src_dataset = "LUNG_CANCER"
src_dataset_path = r"data/lung_cancer_data.csv"
src_encoder_restore = "snapshots/ADDA-source-encoder-lung.pt"
src_classifier_restore = "snapshots/ADDA-source-classifier-lung.pt"
src_model_trained = True
# params for target dataset
# tgt_dataset = "USPS"
# tgt_encoder_restore = "snapshots/ADDA-target-encoder-final.pt"
# tgt_model_trained = True
# params for target dataset lung cqncer ct scan
tgt_dataset = "LUNG_CANCER_CT"
tgt_dataset_path = r"data/lung_cancer_ct_scan_train.csv"
tgt_encoder_restore = "snapshots/ADDA-target-encoder-final.pt"
tgt_model_trained = True
# params for setting up models
model_root = "snapshots"
d_input_dims = 500
d_hidden_dims = 500
d_output_dims = 2
d_model_restore = "snapshots/ADDA-critic-final.pt"
# params for training network
num_gpu = 2
num_epochs_pre = 100
log_step_pre = 20
eval_step_pre = 20
save_step_pre = 100
num_epochs = 2000
log_step = 100
save_step = 100
manual_seed = None
# params for optimizing models
d_learning_rate = 1e-4
c_learning_rate = 1e-4
beta1 = 0.5
beta2 = 0.9