jeffheaton / encog-java-core

http://www.heatonresearch.com/encog
Other
742 stars 268 forks source link

Missing "postIterations()" call in SCG training "iteration()" method. Bug? #171

Closed wiemp closed 10 years ago

wiemp commented 10 years ago

Hello, I currently tested around with SCG training method and added a "EndIterationsStrategy" to the train method. I executed the training with EncogUtility.trainToError and expected to stop either at the reached error rate or after the specified number of iterations. This was working, when I used the ResilientPropagation train method, but for SCG, it didn't stop. While checking the "iteration()" method in ScaledConjugateGradient, I didn't find a "postIterations()" method (like the Propagation "iterations()" method), to call this for the EndIterationsStrategy strategy, so I assume, it's missing. Am I right? I'm using the 3.2.0 released version.

regards, Winfried

jeffheaton commented 10 years ago

Yes that probably should be in there

jeffheaton commented 10 years ago

I show it as like 361.

    ++this.k;

    EngineArray.arrayCopy(this.weights, this.network.getFlat().getWeights());

    postIteration();
}