diff --git a/GATANeuralNetTraining.m b/GATANeuralNetTraining.m index 9bdc15db8b7f497013f79364a363641994e4d913..44d0dc3412b8be3856984b49d4d67df70ee8a653 100644 --- a/GATANeuralNetTraining.m +++ b/GATANeuralNetTraining.m @@ -25,28 +25,28 @@ function GATANeuralNetTraining() source_classes_cell_array); disp('Done!') -%% -% Now we train the classifier -disp('Training a Shallow Neural Network model for classification...') -[nn_model, tr_x, tr_y, training_Pct_Err] = neural_network_classificator_training(training_dataset, ... - desired_features_indices, classes_names, weight_classes, ... - hiddenLayerSize, trainFcn, performFcn); -disp('Done!') - -%% -disp('Using NN for predicting classes...') -[nn_classificated_dataset] = use_nn_classificator(nn_model, ... - testing_dataset, desired_features_indices); + %% + % Now we train the classifier + disp('Training a Shallow Neural Network model for classification...') + [nn_model, tr_x, tr_y, training_Pct_Err] = neural_network_classificator_training(training_dataset, ... + desired_features_indices, classes_names, weight_classes, ... + hiddenLayerSize, trainFcn, performFcn); + disp('Done!') + + %% + disp('Using NN for predicting classes...') + [nn_classificated_dataset] = use_nn_classificator(nn_model, ... + testing_dataset, desired_features_indices); -disp('Done!') + disp('Done!') -%% Now we evaluate the system performance -disp('Computing performance statistics...') -[precission, recall, f1_score, overall_precission, ... + %% Now we evaluate the system performance + disp('Computing performance statistics...') + [precission, recall, f1_score, overall_precission, ... overall_recall, overall_f1_score, IoU] = ... evaluating_segmentation_results(nn_classificated_dataset); -disp('Done!') + disp('Done!') -%% Finally we export the model weights to csv file to use with GATA in ROS -save_model_to_csv(nn_model, neural_net_filename); + %% Finally we export the model weights to csv file to use with GATA in ROS + save_model_to_csv(nn_model, neural_net_filename); end