Skip to content

Commit d58a083

Browse files
committed
added best config model
1 parent 5264a16 commit d58a083

16 files changed

+10520
-0
lines changed

__pycache__/config.cpython-37.pyc

215 Bytes
Binary file not shown.

config.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,32 @@ def __init__(self, model_type):
7171
self.attn_filters = [32, 64, 128] # attn_filters and cnn_dim should be same
7272

7373
self.n_attn_layers = [1, 2, 3]
74+
75+
elif model_type == "attn_train_best_config":
76+
# ablation study
77+
self.seed = 1997
78+
self.data_folder = '..' # .. one level up
79+
self.ct_tab_feature_csv = 'train_data_ct_tab.csv' # some extra features
80+
self.strip_ct = .15 # strip this amount of ct slices before randomly choosing
81+
self.n_tab = 5 # number of tabular features used
82+
83+
# self.cnn_dim = 32 # compressed cnn feature dim
84+
85+
self.fc_dim = [32]
86+
87+
# select which models to train
88+
self.train_models = [ 'resnet18' , 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'resnext50', 'resnext101', 'efnb0', 'efnb1', 'efnb2', 'efnb3', 'efnb4' ]
89+
# train 1 : 'resnet18' , 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'resnext50'
90+
# train 2 : 'resnext101', 'efnb0', 'efnb1', 'efnb2', 'efnb3', 'efnb4'
91+
92+
self.gpu_index = 0
93+
self.num_workers = 0 # 0 for bug fix/docker
94+
self.results_dir = "results_attn_bc"
95+
self.nfold = 5
96+
self.n_epochs = 40
97+
self.batch_size = 10
98+
self.final_lr = 0.0002
99+
100+
self.attn_filters = [64] # attn_filters and cnn_dim should be same
101+
102+
self.n_attn_layers = [1]

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,5 @@ widgetsnbextension==3.5.1
130130
wrapt==1.12.1
131131
zipp==3.1.0
132132
# kaggle
133+
ptflops
134+
thop

0 commit comments

Comments
 (0)