#include <backprop.h>
Inheritance diagram for BackpropTrainer:
Public Methods | |
virtual void | init (const StringMap ¶ms) |
Protected Methods | |
virtual void | initTrain (ANNetwork &network) const |
virtual double | trainOnce (ANNetwork &network, const PatternSet &set) const |
virtual double | trainPattern (ANNetwork &network, const PatternSet &set, int p) const |
virtual void | backpropagate (ANNetwork &network, const PatternSet &set, int p) const |
virtual void | updateWeights (ANNetwork &network) const |
Protected Attributes | |
double | mEta |
double | mMomentum |
double | mDecay |
bool | mBatchLearning |
Vector | mWeightDeltas |
Vector | mError |
Design Patterns: Template Method (various parts of the algorithm can be overloaded).
Definition at line 44 of file backprop.h.
|
Propagates an error signal backwards in the network. Does not modify the network in any way, but stores the per-neuron error in mError. Reimplemented in RPropTrainer. Referenced by RPropTrainer::backpropagate(), and trainPattern(). |
|
This file is part of the Inanna library. * * Copyright (C) 1997-2002 Marko Grönroos <magi@iki.fi> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *
Reimplemented from Trainer. Reimplemented in RPropTrainer. Definition at line 37 of file backprop.cc. References Trainer::init(), mBatchLearning, mDecay, mEta, and mMomentum. |
|
Initializes training.
Reimplemented from Trainer. Reimplemented in RPropTrainer. Definition at line 57 of file backprop.cc. References Trainer::initTrain(), and mWeightDeltas. Referenced by RPropTrainer::initTrain(). |
|
Implementation for Trainer.
Reimplemented from Trainer. Definition at line 71 of file backprop.cc. References mBatchLearning, PatternSource::patterns, trainPattern(), and updateWeights(). |
|
Trains one pattern.
Definition at line 99 of file backprop.cc. References backpropagate(), PatternSet::input(), PatternSource::inputs, PatternSet::output(), PatternSource::outputs, and ANNetwork::update(). Referenced by trainOnce(). |
|
Updates weights after backpropagation phase.
Reimplemented in RPropTrainer. Referenced by trainOnce(). |
|
Should batch learning be used?
Definition at line 79 of file backprop.h. Referenced by RPropTrainer::init(), init(), and trainOnce(). |
|
Weight decay multiplier.
Definition at line 76 of file backprop.h. Referenced by RPropTrainer::init(), init(), and RPropTrainer::updateWeights(). |
|
Errors at each neuron. We store these here, because we don't want to alter the network objects just because of the training algorithm. Definition at line 93 of file backprop.h. Referenced by RPropTrainer::backpropagate(). |
|
Learning speed.
Definition at line 70 of file backprop.h. Referenced by init(). |
|
Momentum.
Definition at line 73 of file backprop.h. Referenced by init(). |
|
Deltas for each weight in the network, in internal order. We store these here, because we don't want to alter the network objects just because of the training algorithm. Definition at line 86 of file backprop.h. Referenced by RPropTrainer::initTrain(), initTrain(), and RPropTrainer::updateWeights(). |