diff --git a/machine_learning/neural_network.cpp b/machine_learning/neural_network.cpp index fc10d2e10..01c4f3891 100644 --- a/machine_learning/neural_network.cpp +++ b/machine_learning/neural_network.cpp @@ -393,7 +393,7 @@ namespace machine_learning { // If there is any problem in opening file if(!in_file.is_open()) { std::cerr << "ERROR: Unable to open file: "<< file_name << std::endl; - exit(EXIT_FAILURE); + std::exit(EXIT_FAILURE); } std::vector >> X, Y; // To store X and Y std::string line; // To store each line @@ -653,7 +653,7 @@ namespace machine_learning { // If there is any problem in opening file if(!out_file.is_open()) { std::cerr << "ERROR: Unable to open file: "<< file_name << std::endl; - exit(EXIT_FAILURE); + std::exit(EXIT_FAILURE); } /** Format in which model is saved: @@ -724,7 +724,7 @@ namespace machine_learning { // If there is any problem in opening file if(!in_file.is_open()) { std::cerr << "ERROR: Unable to open file: "<< file_name << std::endl; - exit(EXIT_FAILURE); + std::exit(EXIT_FAILURE); } std::vector > config; // To store config std::vector >> kernals; // To store pretrained kernals