Skip to content
Snippets Groups Projects
Commit cef2f6b1 authored by Martin Beseda's avatar Martin Beseda
Browse files

ENH: added output to the file for more function in simulator.cpp

parent 099d3329
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ int main(int argc, char** argv){
// Creation of fully connected feed-forward network with linear activation functions for input and output
// layers and the specified a.f. for the hidden ones
std::vector<l4n::NEURON_TYPE> hidden_type_v = {l4n::NEURON_TYPE::LOGISTIC, l4n::NEURON_TYPE::LINEAR};
l4n::FullyConnectedFFN nn(&neuron_numbers_in_layers, &hidden_type_v);
l4n::FullyConnectedFFN nn(&neuron_numbers_in_layers, &hidden_type_v, &output_file);
/* Error function */
l4n::MSE mse(&nn, &ds); // First parameter - neural network, second parameter - data-set
......@@ -91,7 +91,7 @@ int main(int argc, char** argv){
// 1) Threshold for the successful ending of the optimization - deviation from minima
// 2) Number of iterations to reset step size to tolerance/10.0
// 3) Maximal number of iterations - optimization will stop after that, even if not converged
l4n::GradientDescent gs(1e-3, 100, 200);
l4n::GradientDescent gs(1e-3, 100, 10);
// Weight and bias randomization in the network according to the uniform distribution
// Calling methods nn.randomize_weights() and nn.randomize_biases()
......@@ -115,13 +115,13 @@ int main(int argc, char** argv){
nn.save_text("test_net.4n");
/* Check of the saved network - print to STDOUT */
std::cout << std::endl << "The original network info:" << std::endl;
std::cout << std::flush << std::endl << "The original network info:" << std::endl;
nn.write_stats();
nn.write_weights();
nn.write_biases();
l4n::NeuralNetwork nn_loaded("test_net.4n");
std::cout << std::endl << "The loaded network info:" << std::endl;
std::cout << std::flush << std::endl << "The loaded network info:" << std::endl;
nn_loaded.write_stats();
nn.write_weights();
nn.write_biases();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment