Commit 7eac2cdd authored by Fernando Perez-Garcia's avatar Fernando Perez-Garcia

Add script to train a net without batch normalization

parent 95f7da86
#!/usr/bin/env python3
import sys
print('Importing libraries...')
from pathlib import Path
from vesseg import Model, Job
from vesseg.network.model import DSA, T1, T1_GAD
learning_dir = Path('~/mres_project/learning').expanduser()
models_dir = learning_dir / 'models' / 'highres3dnet_223' / 'multimodal_no_bn'
network = 'vesseg_networks.highres3dnet_223_no_bn.HighRes3DNet223NoBN'
combinations = (
(DSA,),
(DSA, T1),
(DSA, T1_GAD),
(DSA, T1, T1_GAD),
)
for inputs in combinations:
string = '-'.join(inputs)
model_name = f'highres3dnet_223_no_bn_{string}'
print(f'Submitting {model_name}...')
model_dir = models_dir / model_name
model = Model(model_dir=model_dir, inputs=inputs)
model.set_images_and_labels_paths()
model.make_csv_files(split_type='subject')
model.config_all()
model.config_input_data(spatial_window_size=96)
model.config_inference(spatial_window_size=96)
model.config_network(network_name=network)
model.write_config_file()
job = Job(model_dir, model.config_path)
job.write()
if len(sys.argv) > 1 and sys.argv[1] == '--submit':
job.submit()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment