Winner take all adapted for temporal noticing. More...
#include <Neuro/WinnerTakeAll.H>
Public Member Functions | |
WinnerTakeAllTempNote (OptionManager &mgr, const std::string &descrName="Winner-Take-All Temporal Noticing", const std::string &tagName="WinnerTakeAllTempNote") | |
Ininitialized constructor. | |
virtual | ~WinnerTakeAllTempNote () |
Destructor. | |
virtual void | reset1 () |
Reset to initial state just after construction. | |
Protected Member Functions | |
virtual void | input (const Image< float > &in) |
Set new input currents for all neurons. | |
virtual Image< float > | getV () const |
Return all our membrane potential voltages as an Image<float> | |
virtual void | saccadicSuppression (const bool on) |
Turn saccadic suppression on/off. | |
virtual void | blinkSuppression (const bool on) |
Turn blink suppression on/off. | |
Image< float > | getVth (const bool normalize=false) const |
virtual void | integrate (const SimTime &t, Point2D< int > &winner) |
Integrate inputs until time t (in s) and update membrane potentials. | |
void | inhibit () |
virtual void | save1 (const ModelComponentSaveInfo &sinfo) |
Save our various results. | |
Protected Attributes | |
Image< LeakyIntFireAdp > | itsNeurons |
segmentImageMC2< float, unsigned int, 1 > | itsMaskSegment |
Use the color segmenter to find a good mask region around winner. | |
std::vector< float > | itsLowMaskBound |
std::vector< float > | itsHighMaskBound |
Image< float > | itsInitMask |
LeakyIntFire | itsGIN |
SimTime | itsT |
float | itsGleak |
float | itsGinh |
float | itsGinput |
Winner take all adapted for temporal noticing.
This is a trivial winner-take-all implementation, based on a 2D layer of LeakyIntFire neurons and a unique global inhibitory neuron. All neurons in the layer charge up in parallel; whenever one reaches threshold, it activates the inhibitory interneuron (which is connected to all neurons in the layer), which in turn resets all neurons in the layer. WinnerTakeAllStd is an Image<LeakyIntFire> and inherits all the standard methods of class Image. To avoid confusion, we here add explicit input() and getV() methods (rather than providing conversion functions between LeakyIntFire and float, which could make the process more transparent but also possibly more confusing).
Definition at line 350 of file WinnerTakeAll.H.
WinnerTakeAllTempNote::WinnerTakeAllTempNote | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Winner-Take-All Temporal Noticing" , |
|||
const std::string & | tagName = "WinnerTakeAllTempNote" | |||
) |
Ininitialized constructor.
The WTA will be resized and initialized the first time input() is called
Definition at line 561 of file WinnerTakeAll.C.
References LeakyIntFire::setGleak().
WinnerTakeAllTempNote::~WinnerTakeAllTempNote | ( | ) | [virtual] |
Destructor.
Definition at line 575 of file WinnerTakeAll.C.
void WinnerTakeAllTempNote::blinkSuppression | ( | const bool | on | ) | [protected, virtual] |
Turn blink suppression on/off.
Reimplemented from WinnerTakeAllStd.
Definition at line 765 of file WinnerTakeAll.C.
References OModelParam< T >::getVal(), and WinnerTakeAllAdapter::itsUseBlinkSuppression.
Image< float > WinnerTakeAllTempNote::getV | ( | ) | const [protected, virtual] |
Return all our membrane potential voltages as an Image<float>
The curent values are possibly normalized to 0..255. The normalization will use itsSalmapFactor if it is non-null
Reimplemented from WinnerTakeAllStd.
Definition at line 710 of file WinnerTakeAll.C.
References Image< T >::begin(), Image< T >::getDims(), NO_INIT, and ModelComponent::stop().
Referenced by save1().
void WinnerTakeAllTempNote::input | ( | const Image< float > & | in | ) | [protected, virtual] |
Set new input currents for all neurons.
This will initialize and resize the network if the network is currently uninitialized (e.g., just after construction or reset()).
Reimplemented from WinnerTakeAllStd.
Definition at line 594 of file WinnerTakeAll.C.
References Image< T >::beginw(), Image< T >::endw(), Image< T >::getDims(), Image< T >::getHeight(), Image< T >::getWidth(), height, Image< T >::initialized(), itsMaskSegment, Image< T >::resize(), segmentImageMC2::SIsetAvg(), segmentImageMC2::SIsetFrame(), segmentImageMC2::SIsetValThresh(), segmentImageMC2::SItoggleCandidateBandPass(), ModelComponent::stop(), and ZEROS.
void WinnerTakeAllTempNote::integrate | ( | const SimTime & | t, | |
Point2D< int > & | winner | |||
) | [protected, virtual] |
Integrate inputs until time t (in s) and update membrane potentials.
Reimplemented from WinnerTakeAllStd.
Definition at line 624 of file WinnerTakeAll.C.
References Image< T >::begin(), Image< T >::beginw(), SimTime::computeDeltaT(), Image< T >::getHeight(), LeakyIntFire::getTimeStep(), LeakyIntFireAdp::getV(), Image< T >::getVal(), LeakyIntFireAdp::getVfire(), Image< T >::getWidth(), Point2D< T >::i, LeakyIntFire::integrate(), WinnerTakeAllAdapter::itsInputCopy, itsMaskSegment, LeakyIntFire::setG(), segmentImageMC2::SIreturnBlobs(), segmentImageMC2::SIreturnNormalizedCandidates(), segmentImageMC2::SIsegment(), and sqrt().
void WinnerTakeAllTempNote::reset1 | ( | ) | [virtual] |
Reset to initial state just after construction.
Reimplemented from WinnerTakeAllStd.
Definition at line 581 of file WinnerTakeAll.C.
References Image< T >::freeMem(), and SimTime::ZERO().
void WinnerTakeAllTempNote::saccadicSuppression | ( | const bool | on | ) | [protected, virtual] |
Turn saccadic suppression on/off.
Reimplemented from WinnerTakeAllStd.
Definition at line 756 of file WinnerTakeAll.C.
References OModelParam< T >::getVal(), and WinnerTakeAllAdapter::itsUseSaccadicSuppression.
void WinnerTakeAllTempNote::save1 | ( | const ModelComponentSaveInfo & | sinfo | ) | [protected, virtual] |
Save our various results.
Reimplemented from ModelComponent.
Definition at line 774 of file WinnerTakeAll.C.
References FLOAT_NORM_0_255, FLOAT_NORM_PRESERVE, getV(), and SRC_POS.
segmentImageMC2<float, unsigned int, 1> WinnerTakeAllTempNote::itsMaskSegment [protected] |
Use the color segmenter to find a good mask region around winner.
Definition at line 390 of file WinnerTakeAll.H.
Referenced by input(), and integrate().