fann icon indicating copy to clipboard operation
fann copied to clipboard

neural_net::get_total_neurons() returns invalid value

Open daedsidog opened this issue 5 years ago • 0 comments

I have a net with 7 layers: 320 320 320 320 320 320 1

Created using the code:

std::vector<unsigned int> layers;
layers.push_back(320);
for (int i = 0; i < 5; ++i)
    layers.push_back(320);
layers.push_back(1);
ann.create_standard_array(7, layers.data());

In the net file, it is saved as: layer_sizes=321 321 321 321 321 321 2 ...which I assumed has no bearing on actual performance. Except, that it does — while the input & output getting functions return the correct appropriate values, get_total_neurons() returns the ones saved in the net file, instead of real neurons.

daedsidog avatar Apr 26 '19 11:04 daedsidog