Commit 6f01a19e authored by Andrei-Claudiu Roibu's avatar Andrei-Claudiu Roibu 🖥
Browse files

added call for test/train/val split

parent cb210299
......@@ -39,7 +39,7 @@ import torch.utils.data as data
from solver import Solver
from BrainMapperUNet import BrainMapperUNet
from utils.data_utils import get_datasets
from utils.data_utils import get_datasets, data_test_train_validation_split
import utils.data_evaluation_utils as evaluations
from utils.data_logging_utils import LogWriter
......@@ -201,6 +201,8 @@ def evaluate_score(training_parameters, network_parameters, misc_parameters, eva
}
"""
################# TODO - NEED TO UPDATE THE DATA FUNCTIONS!
logWriter = LogWriter(number_of_classes=network_parameters['number_of_classes'],
logs_directory=misc_parameters['logs_directory'],
experiment_name=training_parameters['experiment_name']
......@@ -348,6 +350,15 @@ if __name__ == '__main__':
misc_parameters = settings['MISC']
evaluation_parameters = settings['EVALUATION']
data_shuffling_flag = data_parameters['data_split_flag']
if data_shuffling_flag == True:
# Here we shuffle the data!
data_test_train_validation_split(data_parameters['data_directory'], data_parameters['train_percentage'], data_parameters['validation_percentage'])
# TODO: This might also be a very good point to add cross-validation later
else:
if arguments.mode == 'train':
train(data_parameters, training_parameters,
network_parameters, misc_parameters)
......
Supports Markdown
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