diff --git a/include/NeuralNetwork/ConstructiveAlgorithms/CascadeCorrelation.h b/include/NeuralNetwork/ConstructiveAlgorithms/CascadeCorrelation.h index f864e95..6820947 100644 --- a/include/NeuralNetwork/ConstructiveAlgorithms/CascadeCorrelation.h +++ b/include/NeuralNetwork/ConstructiveAlgorithms/CascadeCorrelation.h @@ -39,7 +39,7 @@ namespace NeuralNetwork { } else { error = trainOutputs(network, patterns); } - while(_epoch++ < _maxHiddenUnits && _neurons++ < _maxEpochs && error > _errorTreshold) { + while(_epoch++ < _maxEpochs && _neurons++ < _maxHiddenUnits && error > _errorTreshold) { std::vector> candidates = createCandidates(network.getNeuronSize() - outputs); std::pair, std::vector> candidate = trainCandidates(network, candidates, patterns);