-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathinit_model.py
More file actions
27 lines (25 loc) · 803 Bytes
/
init_model.py
File metadata and controls
27 lines (25 loc) · 803 Bytes
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
from model import Model
def init_model():
# Initialize model
print('Initializing model...')
model_config = {
'dout': True,
'lr': 1e-4,
'num_workers': 32,
'batch_size': 16,
'restore_iter': 0,
'total_iter': 1000,
'model_name': 'NLST-Tri2DNet',
'prt_path': 'NLST-Tri2DNetpretrain_True_0.0001_32-08200-encoder.ptm',
'accumulate_steps': 2,
'train_source': None,
'val_source': None,
'test_source': None
}
model_config['save_name'] = '_'.join([
'{}'.format(model_config['model_name']),
'{}'.format(model_config['dout']),
'{}'.format(model_config['lr']),
'{}'.format(model_config['batch_size']),
])
return Model(**model_config)