|
D:\cpanrun\depot\main\contrib-patched\perl\CPAN\src\AI-NNFlex\blib/lib/AI/NNFlex/momentum.pm |
The momentum module is a modified version of the backprop module (literally - I copied it then did '1,$s/backprop/momentum/g'!)
The only difference is that momentum retains a copy of node dW at the end of the learning cycle. This is then used in the dW calculation for the next pass. The upshot of this is that if a large change took place last time, we're evidently still in the 'large changes' stage of learning, so it should be a large change this time as well.
Copyright (c) 2004-2005 Charles Colbourn. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This package is imported into the NNFlex namespace at runtime via a parameter to the network object.
syntax: $network->learn([0,1,1,0]);
If you have a 4 layer network it will be called to delta the weights between the two hidden layers, and the input to hidden layer
|
D:\cpanrun\depot\main\contrib-patched\perl\CPAN\src\AI-NNFlex\blib/lib/AI/NNFlex/momentum.pm |