Possible bugs in ScaledConjugateGradient and BasicNetwork in encog 2.3.0

kejstud's picture

The ScaledConjugateGradient training class doesn't seem to run preIteration() or postIteration() on iteration(). I suspect it's not intentional, as it renders all additional strategies useless.

Also there seems to be an issue with BasicNetwork clone() or equals().
Let's say we have a BasicNetwork net;
assertEquals(net, net.clone()); fails in junit. In other words net.equals(net.clone()) returns false;
I suspect the problem lies in the equals method, since
assertArrayEquals(NetworkCODEC.networkToArray(net),NetworkCODEC.networkToArray(net.clone()),.0); doesn't fail.

jeffheaton's picture

Thanks for the bug report. Yes, the SCG training should be calling that, otherwise, like you said, the strategies will not work.

I also agree that the network should equal its clone. I will have to look into that. Also sounds like a good unit test once it is working.

Jeff


Copyright 2005 - 2012 by Heaton Research, Inc.. Heaton Research™ and Encog™ are trademarks of Heaton Research. Click here for copyright, license and trademark information.