forked from baumgach/vagan-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
classifier_train.py
32 lines (21 loc) · 909 Bytes
/
classifier_train.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
# Authors:
# Christian F. Baumgartner ([email protected])
from classifier.model_classifier import classifier
def main():
# Select experiment below
from classifier.experiments import synthetic_normalnet as exp_config
# from classifier.experiments import adni_experiment as exp_config
# Get Data
if exp_config.data_identifier == 'synthetic':
from data.synthetic_data import synthetic_data as data_loader
elif exp_config.data_identifier == 'adni':
from data.adni_data import adni_data as data_loader
else:
raise ValueError('Unknown data identifier: %s' % exp_config.data_identifier)
data = data_loader(exp_config)
# Build VAGAN model
classifier_model = classifier(exp_config=exp_config, data=data, fixed_batch_size=exp_config.batch_size)
# Train VAGAN model
classifier_model.train()
if __name__ == '__main__':
main()