1919 * limitations under the License.
2020 */
2121
22- #include < knp/framework/network_validator.h>
23-
2422#include < iostream>
2523
2624#include " dataset.h"
2725#include " evaluate_results.h"
2826#include " inference.h"
27+ #include " network_validation.h"
2928#include " parse_arguments.h"
3029#include " save_network.h"
3130#include " training.h"
3231
3332
34- /* *
35- * @brief Execute complete model pipeline for specified neuron type.
36- *
37- * @details This template function orchestrates the entire machine learning pipeline for neural networks, including
38- * dataset processing, network construction, training, inference, and evaluation. It serves as the core execution
39- * engine for both AltAI and BLIFAT neuron models.
40- *
41- * @tparam Neuron neuron type for neuron model specification.
42- *
43- * @param model_desc model description containing configuration parameters and paths.
44- */
33+ // Execute complete model pipeline for specified neuron type.
34+ // This template function orchestrates the entire machine learning pipeline for neural networks, including dataset
35+ // processing, network construction, training, inference, and evaluation. It serves as the core execution engine
36+ // for both AltAI and BLIFAT neuron models.
4537template <typename Neuron>
4638void run_model (const ModelDescription& model_desc)
4739{
4840 Dataset dataset = process_dataset (model_desc);
4941
5042 AnnotatedNetwork network = construct_network<Neuron>(model_desc);
5143
52- knp::framework::NetworkValidator validator;
53- validator.add_validator (knp::framework::network_validators::Connectivity ());
54- bool validation_result = validator.run_validators (network.network_ );
55- if (!validation_result)
56- {
57- throw std::runtime_error (" Network validation failed." );
58- }
44+ validate_network (network.network_ );
5945
46+ // Create backend loader for training and inference.
6047 // Online Help link: https://click.kaspersky.com/?hl=en-US&version=2.0&pid=KNP&link=online_help&helpid=243548
6148 knp::framework::BackendLoader backend_loader;
6249
@@ -74,17 +61,10 @@ void run_model(const ModelDescription& model_desc)
7461}
7562
7663
77- /* *
78- * @brief Main application entry point.
79- *
80- * @details This function serves as the primary execution point for the MNIST neural network learning application.
81- * It handles command-line argument parsing, configuration validation, user interaction, and routes execution to
82- * the appropriate neuron model.
83- *
84- * @param argc argument count.
85- * @param argv arguments values.
86- * @return ret code.
87- */
64+ // Main application entry point.
65+ // This function serves as the primary execution point for the MNIST neural network learning application.
66+ // It handles command-line argument parsing, configuration validation, user interaction, and routes execution to
67+ // the appropriate neuron model.
8868int main (int argc, char ** argv)
8969{
9070 // Parse command-line arguments and validate configuration.
@@ -103,7 +83,6 @@ int main(int argc, char** argv)
10383 {
10484 case SupportedModelType::BLIFAT:
10585 {
106- // cppcheck-suppress throwInEntryPoint
10786 run_model<knp::neuron_traits::BLIFATNeuron>(model_desc);
10887 break ;
10988 }
0 commit comments