TarzaNN
TarzaNN neural network simulator
|
#include <FeaturePlaneAbstract.h>
FeaturePlaneAbstract::~FeaturePlaneAbstract | ( | ) |
destructor.
FeaturePlaneAbstract::FeaturePlaneAbstract | ( | ) | [protected] |
Default constructor
FeaturePlaneAbstract::FeaturePlaneAbstract | ( | Network * | net, |
int | l, | ||
QString * | n, | ||
int | w, | ||
int | h, | ||
int | angles, | ||
int | speeds, | ||
int | alpha, | ||
int | speed, | ||
bool | isWTA, | ||
bool | visible, | ||
NotifyStrategyAbstract * | notify, | ||
Neuron * | neuron = NULL |
||
) | [protected] |
Constructor
net | - network, this FP will be added to the end of the list of feature planes |
l | - layer index |
name | - name of the feature plane |
w | - width |
h | - height |
angles | - number of discrete angles (e.g. speeds, orientations) |
speeds | - number of speeds (e.g. speed bands, scale bands) |
alpha | - alpha |
speed | - speed of this fp |
isWTA | - participates in Selective Tuning |
visible | - should the FP be presented in the UI |
notify | - notification strategy (deprecated, on the way out) |
neuron | - neuron strategy (what is the output nonlinearity, or the ODE that defines response) |
void FeaturePlaneAbstract::_XMLSerialize | ( | int & | tabs, |
QTextStream * | buf, | ||
PlaneInputs * | tmpList, | ||
int | type | ||
) | [protected] |
virtual FeaturePlaneInput* FeaturePlaneAbstract::addFilter | ( | Filter * | f, |
FeaturePlaneAbstract * | fp, | ||
int | type, | ||
int | fpOutputIndex, | ||
bool | wta | ||
) | [inline, virtual] |
Add an input filter/feature plane pair. In general, do nothing, redefined in FeaturePlane
Reimplemented in FeaturePlane, LearningFeaturePlane, InputFeaturePlaneAbstract, STSOMFeaturePlane, CTSOMFeaturePlane, and FeaturePlaneProxy.
void FeaturePlaneAbstract::addToHistory | ( | OutputImage * | tmpElement, |
set< OutputImage * > * | tmpOutputHistory | ||
) |
Add output to history.
void FeaturePlaneAbstract::addToHistory | ( | OutputImage * | tmpElement, |
set< OutputImage * > * | tmpOutputHistory, | ||
OutputImage ** | currOutput, | ||
QMutex * | currOutputMutex | ||
) |
Add output to history using a specific mutexes -> only invoked when having more than one current output.
void FeaturePlaneAbstract::applyGatingControl | ( | ) | [protected] |
Reimplemented in FeaturePlane, BPLearningFeaturePlane, and MotionFeaturePlane.
void FeaturePlaneAbstract::attachProxy | ( | NodeProxy * | np | ) |
Attach an observer located on a different node.
static bool FeaturePlaneAbstract::CompareLayer | ( | const FeaturePlaneAbstract * | d1, |
const FeaturePlaneAbstract * | d2 | ||
) | [inline, static] |
void FeaturePlaneAbstract::createGatingControl | ( | ) | [protected] |
virtual void FeaturePlaneAbstract::editFeaturePlaneInput | ( | FeaturePlaneInput * | oldElement, |
FeaturePlaneInput * | newElement | ||
) | [inline, virtual] |
Reimplemented in FeaturePlane.
void FeaturePlaneAbstract::emptyHistory | ( | set< OutputImage * > * | tmpOutputHistory | ) |
Clean output history.
int FeaturePlaneAbstract::getAngle | ( | ) | [inline] |
int FeaturePlaneAbstract::getAngles | ( | ) | [inline] |
Reimplemented in MGMotionFeaturePlane.
OutputImage * FeaturePlaneAbstract::getCurrentOutput | ( | int | index | ) | [virtual] |
Returns the feature plane's latest output, with an index for multi-output FPs. Overloaded in InputControllerAbstract and InputFeaturePlane where we can get RGB independently.
Reimplemented in FeaturePlane, InputMultipleFeaturePlane, and InputLearningFeaturePlane.
OutputImage * FeaturePlaneAbstract::getCurrentOutput | ( | ) | [virtual] |
Returns the feature plane's latest output.
Reimplemented in InputMultipleFeaturePlane, and InputLearningFeaturePlane.
double FeaturePlaneAbstract::getDisplayAngle | ( | ) |
Get the display angle - see void setName(QString* tmpName);
double FeaturePlaneAbstract::getDisplayDelta | ( | ) |
Get the display delta - see void setName(QString* tmpName);
double FeaturePlaneAbstract::getDisplayScale | ( | ) |
Get the display scale - see void setName(QString* tmpName);
float FeaturePlaneAbstract::getFeatureBias | ( | ) |
Return Feature bias. One value for the whole feature map (0-1, default 1)
Matrix * FeaturePlaneAbstract::getGatingControl | ( | ) | [virtual] |
Return the internal gating control for display purposes. Locks gcMutex
virtual PlaneInputs* FeaturePlaneAbstract::getGatingControlInputList | ( | ) | [inline, virtual] |
virtual int FeaturePlaneAbstract::getGatingControlInputListSize | ( | ) | [inline, virtual] |
OutputImage * FeaturePlaneAbstract::getGatingControlOutput | ( | int | index | ) |
int FeaturePlaneAbstract::getGatingControlOutputCount | ( | ) |
virtual OutputImage* FeaturePlaneAbstract::getHeadImage | ( | ) | [inline, virtual] |
Reimplemented in InputSocketFeaturePlane, and InputVirtualFeaturePlane.
int FeaturePlaneAbstract::getID | ( | ) |
Returns the index in the feature plane list
OutputImage* FeaturePlaneAbstract::getImage | ( | ) | [inline, virtual] |
Layer * FeaturePlaneAbstract::getLayer | ( | int | layerIndex | ) |
Get the layer to which this fp belongs
int FeaturePlaneAbstract::getLayerIndex | ( | ) |
Get the index of the layer to which this fp belongs
Matrix* FeaturePlaneAbstract::getMap | ( | ) | [inline, virtual] |
virtual PlaneInputs* FeaturePlaneAbstract::getMaskingInputList | ( | ) | [inline, virtual] |
Reimplemented in FeaturePlane.
virtual float FeaturePlaneAbstract::getMaxActivation | ( | ) | [inline, virtual] |
Reimplemented in FeaturePlane.
QString * FeaturePlaneAbstract::getName | ( | ) |
Get feature plane name.
virtual PlaneInputs* FeaturePlaneAbstract::getNonFourierInputList | ( | ) | [inline, virtual] |
Reimplemented in FeaturePlane.
virtual PlaneInputs* FeaturePlaneAbstract::getRegularInputList | ( | ) | [inline, virtual] |
Reimplemented in FeaturePlane.
int FeaturePlaneAbstract::getSpeed | ( | ) | [inline] |
int FeaturePlaneAbstract::getSpeeds | ( | ) | [inline] |
Reimplemented in MGMotionFeaturePlane.
int FeaturePlaneAbstract::getType | ( | const QString | name | ) | [static] |
QString FeaturePlaneAbstract::getType | ( | int | value | ) | [static] |
Reimplemented in FeaturePlaneProxy.
virtual QImage* FeaturePlaneAbstract::getVirtualImage | ( | bool | showRect | ) | [inline, virtual] |
Reimplemented in InputVirtualFeaturePlane.
int FeaturePlaneAbstract::getXSize | ( | ) |
int FeaturePlaneAbstract::getYSize | ( | ) |
void FeaturePlaneAbstract::inhibitReturn | ( | ) | [virtual] |
Reimplemented in FeaturePlane, InputFeaturePlane, InputFeaturePlaneAbstract, InputMultipleFeaturePlane, and InputLearningFeaturePlane.
void FeaturePlaneAbstract::init | ( | ) | [protected] |
void FeaturePlaneAbstract::initSelectiveTuning | ( | ) |
virtual bool FeaturePlaneAbstract::isInputFP | ( | ) | [inline, virtual] |
Reimplemented in InputFeaturePlaneAbstract.
bool FeaturePlaneAbstract::isWTA | ( | ) |
virtual bool FeaturePlaneAbstract::moveHead | ( | int | deltaX, |
int | deltaY, | ||
bool | notify = true |
||
) | [inline, virtual] |
todo update due to the fact we have implemented InputControllerAbstract with templates, we cannot do dynamic casting. we will have to overload a whole bunch of methods in the appropriate classes
Reimplemented in InputSocketFeaturePlane, and InputVirtualFeaturePlane.
void FeaturePlaneAbstract::notify | ( | ) |
Notify all observers of new output being available
void FeaturePlaneAbstract::notify | ( | bool | functional | ) |
Notify all observers of new output being available If functional is false, only GUI gets updated
void FeaturePlaneAbstract::PauseThread | ( | ) |
Dummy worker to wake up the thread, just in case it was waiting due to a SYNC Notification
virtual void FeaturePlaneAbstract::processTargetPlane | ( | ) | [inline, virtual] |
Reimplemented in InputControllerAbstract.
void FeaturePlaneAbstract::releaseGatingControl | ( | ) | [virtual] |
Release gcMutex
void FeaturePlaneAbstract::releaseMap | ( | ) | [inline, virtual] |
Reimplemented from Viewable.
virtual void FeaturePlaneAbstract::removeFeaturePlaneInput | ( | FeaturePlaneInput * | theElement | ) | [inline, virtual] |
Reimplemented in FeaturePlane.
virtual void FeaturePlaneAbstract::removeFeaturePlaneInput | ( | FeaturePlaneAbstract * | theElement | ) | [inline, virtual] |
Reimplemented in FeaturePlane.
virtual void FeaturePlaneAbstract::removeFeaturePlaneInputs | ( | ) | [inline, virtual] |
Reimplemented in FeaturePlane.
void FeaturePlaneAbstract::run | ( | ) |
Entry point for thread pool invocation.
Reimplemented in FeaturePlane, InputFeaturePlaneAbstract, InputFeaturePlane, BPLearningFeaturePlane, InputCameraFeaturePlane, and FeaturePlaneProxy.
void FeaturePlaneAbstract::selectWinner | ( | int | selectX, |
int | selectY | ||
) |
Manually select winners from the UI
void FeaturePlaneAbstract::setFeatureBias | ( | float | tmpBias | ) |
Initialize Feature bias. One value for the whole feature map (0-1, default 1)
void FeaturePlaneAbstract::setFunction | ( | pt2Function | theFunction | ) |
Set helper function call that will be invoked at the end of each iteration. The function has to be defined as a static member of the class FeaturePlaneHelper
void FeaturePlaneAbstract::setLayerIndex | ( | int | l | ) |
Set the layer to which this fp belongs
void FeaturePlaneAbstract::setName | ( | QString * | tmpName | ) |
Set feature plane name.
Also parse the name for motion-model style display purposes
Convention: Some_name_SCALE_ANGLE_DELTA (where SCALE, ANGLE and DELTA are numbers)
Note: not all need to be present, but they can not be missing from the beginning or middle, i.e. you can have SCALE without DELTA, but not DELTA without SCALE and ANGLE
void FeaturePlaneAbstract::setNode | ( | NodeAbstract * | n | ) |
Set the node to which this FP belongs.
void FeaturePlaneAbstract::setParameters | ( | paramMap | params | ) |
void FeaturePlaneAbstract::setSpatialBias | ( | Matrix * | tmpSpatialBias | ) |
Initialize Spatial bias map. Does not do a deep copy, so be careful !
void FeaturePlaneAbstract::setSpatialTaskBias | ( | OutputImage * | tmpSpatialBias | ) |
Initialize Spatial bias map based on task as a first approximation, threshold input and scale
void FeaturePlaneAbstract::setTheta | ( | float | t | ) |
Set STM WTA theta parameter.
void FeaturePlaneAbstract::setThreshold | ( | float | t | ) |
Set the node to which this FP belongs.
void FeaturePlaneAbstract::setThresholdBinarize | ( | float | t | ) |
void FeaturePlaneAbstract::setThresholdPercent | ( | float | t | ) |
void FeaturePlaneAbstract::StartThread | ( | ) |
void FeaturePlaneAbstract::TerminateThread | ( | ) |
void FeaturePlaneAbstract::updateNN | ( | Observer * | sourceFP, |
bool | functional | ||
) | [virtual] |
Implements Observer.
void FeaturePlaneAbstract::XMLSerialize | ( | int | tabs, |
QTextStream * | buf | ||
) |
friend class ClientSocket [friend] |
friend class FeaturePlaneFactory [friend] |
Reimplemented in InputSocketFeaturePlane, InputFeaturePlane, InputMultipleFeaturePlane, LearningFeaturePlane, InputVirtualFeaturePlane, FeaturePlane, InputLearningFeaturePlane, STSOMFeaturePlane, InputCameraFeaturePlane, MotionFeaturePlane, CTSOMFeaturePlane, SOMFeaturePlane, BPLearningFeaturePlane, SaliencyOutputFeaturePlane, MGMotionFeaturePlane, FeaturePlaneFHM, FeaturePlaneHistogram, ConstantInputFeaturePlane, and SaliencyFeaturePlane.
friend class Network [friend] |
Reimplemented in InputFeaturePlane.
friend class UI_DesignerPropDisplay [friend] |
friend class UI_FeaturePlaneProp [friend] |
friend class UI_FilterProp [friend] |
list<NodeProxy*> FeaturePlaneAbstract::_observersProxyList [protected] |
NodeAbstract* FeaturePlaneAbstract::_parentNode [protected] |
int FeaturePlaneAbstract::alpha [protected] |
int FeaturePlaneAbstract::angles [protected] |
int FeaturePlaneAbstract::currentLayer = 0 [static] |
OutputImage* FeaturePlaneAbstract::currentOutput [protected] |
OutputImage** FeaturePlaneAbstract::currentOutputList [protected] |
QMutex FeaturePlaneAbstract::currentOutputListMutex [protected] |
QMutex FeaturePlaneAbstract::currentOutputMutex [protected] |
display parameters for the UI_Designer
float FeaturePlaneAbstract::featureBias [protected] |
Feature bias factor - 0-1
int FeaturePlaneAbstract::fpID [protected] |
FP output viewer window.
pt2Function FeaturePlaneAbstract::functionCall [protected] |
set<OutputImage*>** FeaturePlaneAbstract::gatingControlHistoryList [protected] |
int FeaturePlaneAbstract::gatingControlOutputCount [protected] |
QMutex FeaturePlaneAbstract::gatingControlOutputListMutex [protected] |
QMutex FeaturePlaneAbstract::gcMutex [protected] |
Mutex controling access to the gating control
int FeaturePlaneAbstract::height [protected] |
paramMap FeaturePlaneAbstract::initParams [protected] |
int FeaturePlaneAbstract::inputs [protected] |
Inhibition of return map. STM requires selected connections to be inhibited for IOR, this is not it, just black out parts of the input for now
bool FeaturePlaneAbstract::is_WTA [protected] |
the no. of iterations
int FeaturePlaneAbstract::layerIndex [protected] |
Neuron Time Course window.
Network* FeaturePlaneAbstract::nn [protected] |
QMutex FeaturePlaneAbstract::observerProxyMutex [protected] |
set<OutputImage*> FeaturePlaneAbstract::outputHistory [protected] |
set<OutputImage*>** FeaturePlaneAbstract::outputHistoryList [protected] |
int FeaturePlaneAbstract::outputs [protected] |
Matrix* FeaturePlaneAbstract::spatialBias [protected] |
Spatial bias mask
int FeaturePlaneAbstract::speed [protected] |
int FeaturePlaneAbstract::speeds [protected] |
OutputImage* FeaturePlaneAbstract::theGatingControl [protected] |
The neuron strategy
The notify strategy
float FeaturePlaneAbstract::theta [protected] |
float FeaturePlaneAbstract::threshold [protected] |
All activations below this value are set to zero
float FeaturePlaneAbstract::threshold_binarize [protected] |
All activations below this percentage of the maximum are set to zero, above set to 1. Percent is expressed as 0.xxx (i.e. for 80% declare 0.8 in the xml)
float FeaturePlaneAbstract::threshold_percent [protected] |
All activations below this percentage of the maximum are set to zero. Percent is expressed as 0.xxx (i.e. for 80% declare 0.8 in the xml)
int FeaturePlaneAbstract::totalWorkingThreads = 0 [static] |
int FeaturePlaneAbstract::width [protected] |
int FeaturePlaneAbstract::workingThreads = 0 [static] |
QWaitCondition* FeaturePlaneAbstract::workingThreadsCond [static] |
Specify whether the feature planes should wait for each other or not
QMutex FeaturePlaneAbstract::workingThreadsMutex [static] |
OutputImage* FeaturePlaneAbstract::workOutput [protected] |
Temporary storage for the output
OutputImage** FeaturePlaneAbstract::workOutputList [protected] |