encog-dotnet-core
encog-dotnet-core copied to clipboard
Missing base call in ResilientPropagation.PostIteration
Hi,
I'm new to Encog and try to play a little with it. I've tried some Training configuration and get stuck while trying to use a ResilientPropagation with an IEndTrainingStrategy. The method void PostIteration()
of the strategy was never called.
I don't know if it's a real issue (maybe using an IEndTrainingStrategy
with a ResilientPropagation
is not a wanted usecase), but maybe you should consider calling the base method while overriding virtual ones.
In ResilientPropagation.cs
:
public override void PostIteration()
{
_lastError = Error;
}
should be replace with
public override void PostIteration()
{
base.PostIteration();
_lastError = Error;
}
@Nathaire have you validated the end strategy as working as desired after training with this change? This is interesting to me, as well.
@jeroldhaas yes, it works as desired. I've quickly take a look at Encog Java sources and the call to super is made there:
public void postIteration() {
super.postIteration();
this.lastError = getError();
}