TarzaNN
TarzaNN neural network simulator
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
FeaturePlane Class Reference

The key structure in the network. A feature plane is a collection of identical neurons, all receiving input from the same other feature planes, and all having the same receptive field structure (i.e. filters). More...

#include <FeaturePlane.h>

Inheritance diagram for FeaturePlane:
FeaturePlaneAbstract Observer Viewable FeaturePlaneFHM FeaturePlaneHistogram LearningFeaturePlane MGMotionFeaturePlane MotionFeaturePlane SaliencyFeaturePlane SaliencyOutputFeaturePlane BPLearningFeaturePlane CTSOMFeaturePlane SOMFeaturePlane STSOMFeaturePlane

List of all members.

Public Member Functions

OutputImagegetCurrentOutput (int index)
 ~FeaturePlane ()
FeaturePlaneInputaddFilter (Filter *f, FeaturePlaneAbstract *fp, int type, int fpOutputIndex, bool wta)
void editFeaturePlaneInput (FeaturePlaneInput *theOld, FeaturePlaneInput *theNew)
void removeFeaturePlaneInput (FeaturePlaneInput *f)
void removeFeaturePlaneInput (FeaturePlaneAbstract *f)
void removeFeaturePlaneInputs ()
virtual PlaneInputsgetRegularInputList ()
virtual PlaneInputsgetErrorInputList ()
virtual PlaneInputsgetMaskingInputList ()
virtual PlaneInputsgetNonFourierInputList ()
float getMaxActivation ()
void inhibitReturn ()

Protected Member Functions

 FeaturePlane (Network *net, int l, QString *n, int w, int h, int angles, int speeds, int alpha, int speed, bool isWTA, bool visible, Neuron *neuron, NotifyStrategyAbstract *notify)
 FeaturePlane ()
virtual void step ()
virtual void run ()
void applyGatingControl ()
void finalize ()
void sumActivations ()
void ThreadEntry ()
void _removeFeaturePlaneInputHelper1 (FeaturePlaneInput *f, PlaneInputs *inputList, int &inputCount, bool deleteAll=false)
void _removeFeaturePlaneInputHelper2 (FeaturePlaneAbstract *f, PlaneInputs *inputList, int &inputCount)
void _editFeaturePlaneInput (FeaturePlaneInput *theOld, FeaturePlaneInput *theNew, PlaneInputs *inputList)
virtual void computeActivations ()
void computeActivations (PlaneInputs inputPlane, MatrixVector activations)
void computeActivationFromGating (PlaneInputs inputPlane, MatrixVector activations)
void computeNonFourierActivations (PlaneInputs inputPlane, MatrixVector activations)
virtual void sumActivations (MatrixVector regularActivations, MatrixVector nonFourierActivations, Matrix *totalActivation)
void _sumActivations (MatrixVector activations, Matrix *totalActivation)
void STM_sumActivations (MatrixVector activations, Matrix *totalActivation)
void computeGatingUnits (PlaneInputs inputPlane)
void applyMasking (OutputImage *workOutput, MatrixVector maskingActivations, Matrix *totalActivation)
void applyThreshold (Matrix *totalActivation)

Protected Attributes

PlaneInputs regularInputList
PlaneInputs errorInputList
PlaneInputs maskingInputList
PlaneInputs nonFourierInputList
GatingUnitsVector gatingUnitsList
MatrixVector regularActivations
MatrixVector maskingActivations
MatrixVector nonFourierActivations
MatrixtotalActivation
int regularInputCount
int errorInputCount
int maskingInputCount
int nonFourierInputCount
MatrixtempResized
void(FeaturePlane::* doComputeActivations )(PlaneInputs inputPlane, MatrixVector activations)
void(FeaturePlane::* doSumActivations )(MatrixVector activations, Matrix *totalActivation)

Friends

class FeaturePlaneFactory

Detailed Description

The key structure in the network. A feature plane is a collection of identical neurons, all receiving input from the same other feature planes, and all having the same receptive field structure (i.e. filters).


Constructor & Destructor Documentation

FeaturePlane::FeaturePlane ( Network net,
int  l,
QString *  n,
int  w,
int  h,
int  angles,
int  speeds,
int  alpha,
int  speed,
bool  isWTA,
bool  visible,
Neuron neuron,
NotifyStrategyAbstract notify 
) [protected]

Constructor.

Parameters:
netnetwork to which the FP belongs
lindex of the layer to which the FP belongs
nname of the feature plane
wwidth
hheight
visibleshould be shown in the UI? Constructor.
netnetwork to which the FP belongs
lindex of the layer to which the FP belongs
nname of the feature plane
wwidth
hheight
visibleshould be shown in the UI?
nsneuron type (in case the neuron type can not be created by its default constructor)
FeaturePlane::~FeaturePlane ( )

todo delete notify, neuron

Todo:
need to delete the inputFilters!!!!
FeaturePlane::FeaturePlane ( ) [protected]

Member Function Documentation

void FeaturePlane::_editFeaturePlaneInput ( FeaturePlaneInput theOld,
FeaturePlaneInput theNew,
PlaneInputs inputList 
) [protected]
void FeaturePlane::_removeFeaturePlaneInputHelper1 ( FeaturePlaneInput f,
PlaneInputs inputList,
int &  inputCount,
bool  deleteAll = false 
) [protected]
void FeaturePlane::_removeFeaturePlaneInputHelper2 ( FeaturePlaneAbstract f,
PlaneInputs inputList,
int &  inputCount 
) [protected]
void FeaturePlane::_sumActivations ( MatrixVector  activations,
Matrix totalActivation 
) [protected]
FeaturePlaneInput * FeaturePlane::addFilter ( Filter f,
FeaturePlaneAbstract fp,
int  type,
int  fpOutputIndex,
bool  wta 
) [virtual]

Add an input filter/feature plane pair.

Parameters:
f- filter
fp- input feature plane
type- input type: regular, non-Fourier, masking
fpOutputIndex- in case input feature plane has more than one output, which one are we interested in

Reimplemented from FeaturePlaneAbstract.

Reimplemented in LearningFeaturePlane, STSOMFeaturePlane, and CTSOMFeaturePlane.

void FeaturePlane::applyGatingControl ( ) [protected]

Apply gating, propagate selection to inputs

Reimplemented from FeaturePlaneAbstract.

Reimplemented in BPLearningFeaturePlane, and MotionFeaturePlane.

void FeaturePlane::applyMasking ( OutputImage workOutput,
MatrixVector  maskingActivations,
Matrix totalActivation 
) [protected]
Todo:
  • resize masking activations
Todo:
threshold
void FeaturePlane::applyThreshold ( Matrix totalActivation) [protected]

Threshold activations. All activations below threshold or below threshold_percent of the maximum value are set to zero.

void FeaturePlane::computeActivationFromGating ( PlaneInputs  inputPlane,
MatrixVector  activations 
) [protected]
void FeaturePlane::computeActivations ( ) [protected, virtual]
void FeaturePlane::computeActivations ( PlaneInputs  inputPlane,
MatrixVector  activations 
) [protected]

Reimplemented in FeaturePlaneHistogram.

void FeaturePlane::computeGatingUnits ( PlaneInputs  inputPlane) [protected]
void FeaturePlane::computeNonFourierActivations ( PlaneInputs  inputPlane,
MatrixVector  activations 
) [protected]

LIMITATIONS

  • even number of inputs
  • pairs of inputs share a filter
void FeaturePlane::editFeaturePlaneInput ( FeaturePlaneInput theOld,
FeaturePlaneInput theNew 
) [virtual]

Reimplemented from FeaturePlaneAbstract.

void FeaturePlane::finalize ( ) [protected]

Add current output to output history, notify Observers

OutputImage * FeaturePlane::getCurrentOutput ( int  index) [virtual]

Returns the last computed output

Reimplemented from FeaturePlaneAbstract.

virtual PlaneInputs* FeaturePlane::getErrorInputList ( ) [inline, virtual]
virtual PlaneInputs* FeaturePlane::getMaskingInputList ( ) [inline, virtual]

Reimplemented from FeaturePlaneAbstract.

float FeaturePlane::getMaxActivation ( ) [inline, virtual]

Reimplemented from FeaturePlaneAbstract.

virtual PlaneInputs* FeaturePlane::getNonFourierInputList ( ) [inline, virtual]

Reimplemented from FeaturePlaneAbstract.

virtual PlaneInputs* FeaturePlane::getRegularInputList ( ) [inline, virtual]

Reimplemented from FeaturePlaneAbstract.

void FeaturePlane::inhibitReturn ( ) [virtual]

Reimplemented from FeaturePlaneAbstract.

void FeaturePlane::removeFeaturePlaneInput ( FeaturePlaneInput f) [virtual]

Reimplemented from FeaturePlaneAbstract.

void FeaturePlane::removeFeaturePlaneInput ( FeaturePlaneAbstract f) [virtual]

Reimplemented from FeaturePlaneAbstract.

void FeaturePlane::removeFeaturePlaneInputs ( ) [virtual]

Reimplemented from FeaturePlaneAbstract.

void FeaturePlane::run ( ) [protected, virtual]

Do one computation step - compute activations, and FP output

Reimplemented from FeaturePlaneAbstract.

Reimplemented in BPLearningFeaturePlane.

void FeaturePlane::step ( ) [protected, virtual]

Do one computation step - compute activations, and FP output

Reimplemented in STSOMFeaturePlane, CTSOMFeaturePlane, BPLearningFeaturePlane, SOMFeaturePlane, and MotionFeaturePlane.

void FeaturePlane::STM_sumActivations ( MatrixVector  activations,
Matrix totalActivation 
) [protected]
void FeaturePlane::sumActivations ( ) [protected]
void FeaturePlane::sumActivations ( MatrixVector  regularActivations,
MatrixVector  nonFourierActivations,
Matrix totalActivation 
) [protected, virtual]
void FeaturePlane::ThreadEntry ( ) [protected]

Friends And Related Function Documentation

friend class FeaturePlaneFactory [friend]

Member Data Documentation

void(FeaturePlane::* FeaturePlane::doComputeActivations)(PlaneInputs inputPlane, MatrixVector activations) [protected]
void(FeaturePlane::* FeaturePlane::doSumActivations)(MatrixVector activations, Matrix *totalActivation) [protected]

Each input feature plane / filter combination produces a partial activation

Vector of inputs - pairs of filters and feature planes

Sum of the partial activations


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines