The standard winner-take-all. More...
#include <Neuro/WinnerTakeAll.H>
Public Member Functions | |
WinnerTakeAllStd (OptionManager &mgr, const std::string &descrName="Winner-Take-All Std", const std::string &tagName="WinnerTakeAllStd") | |
Constructor. | |
virtual | ~WinnerTakeAllStd () |
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. | |
virtual void | integrate (const SimTime &t, Point2D< int > &winner) |
Integrate inputs until time t (in s) and update membrane potentials. | |
void | inhibit () |
Protected Attributes | |
Image< LeakyIntFire > | itsNeurons |
LeakyIntFire | itsGIN |
SimTime | itsT |
float | itsGleak |
float | itsGinh |
float | itsGinput |
The standard winner-take-all.
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 227 of file WinnerTakeAll.H.
WinnerTakeAllStd::WinnerTakeAllStd | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Winner-Take-All Std" , |
|||
const std::string & | tagName = "WinnerTakeAllStd" | |||
) |
WinnerTakeAllStd::~WinnerTakeAllStd | ( | ) | [virtual] |
Destructor.
Definition at line 264 of file WinnerTakeAll.C.
void WinnerTakeAllStd::blinkSuppression | ( | const bool | on | ) | [protected, virtual] |
Turn blink suppression on/off.
Implements WinnerTakeAllAdapter.
Reimplemented in WinnerTakeAllTempNote.
Definition at line 376 of file WinnerTakeAll.C.
References OModelParam< T >::getVal(), and WinnerTakeAllAdapter::itsUseBlinkSuppression.
Image< float > WinnerTakeAllStd::getV | ( | ) | const [protected, virtual] |
Return all our membrane potential voltages as an Image<float>
Implements WinnerTakeAllAdapter.
Reimplemented in WinnerTakeAllTempNote.
Definition at line 343 of file WinnerTakeAll.C.
References Image< T >::begin(), Image< T >::getDims(), NO_INIT, and ModelComponent::stop().
Referenced by WinnerTakeAllGreedy::integrate().
void WinnerTakeAllStd::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()).
Implements WinnerTakeAllAdapter.
Reimplemented in WinnerTakeAllTempNote.
Definition at line 283 of file WinnerTakeAll.C.
References Image< T >::beginw(), Image< T >::endw(), Image< T >::getDims(), Image< T >::initialized(), Image< T >::resize(), ModelComponent::stop(), and ZEROS.
void WinnerTakeAllStd::integrate | ( | const SimTime & | t, | |
Point2D< int > & | winner | |||
) | [protected, virtual] |
Integrate inputs until time t (in s) and update membrane potentials.
Implements WinnerTakeAllAdapter.
Reimplemented in WinnerTakeAllGreedy, and WinnerTakeAllTempNote.
Definition at line 302 of file WinnerTakeAll.C.
References Image< T >::begin(), Image< T >::beginw(), SimTime::computeDeltaT(), Image< T >::getHeight(), LeakyIntFire::getTimeStep(), Image< T >::getWidth(), Point2D< T >::i, LeakyIntFire::integrate(), WinnerTakeAllAdapter::itsInputCopy, and LeakyIntFire::setG().
void WinnerTakeAllStd::reset1 | ( | ) | [virtual] |
Reset to initial state just after construction.
Reimplemented from WinnerTakeAllAdapter.
Reimplemented in WinnerTakeAllTempNote.
Definition at line 270 of file WinnerTakeAll.C.
References Image< T >::freeMem(), and SimTime::ZERO().
void WinnerTakeAllStd::saccadicSuppression | ( | const bool | on | ) | [protected, virtual] |
Turn saccadic suppression on/off.
Implements WinnerTakeAllAdapter.
Reimplemented in WinnerTakeAllTempNote.
Definition at line 367 of file WinnerTakeAll.C.
References OModelParam< T >::getVal(), and WinnerTakeAllAdapter::itsUseSaccadicSuppression.