#include <amygdala/neuron.h>
Inheritance diagram for Neuron:
Public Types | |
typedef vector< Synapse * >::iterator | iterator |
typedef vector< Synapse * >::const_iterator | const_iterator |
typedef vector< Synapse * >::reverse_iterator | reverse_iterator |
typedef vector< Synapse * >::const_reverse_iterator | const_reverse_iterator |
Public Methods | |
Neuron (AmIdInt neuronId) | |
virtual | ~Neuron () |
void | SetAxonSize (int size) |
int | GetAxonSize () const |
vector< SMPSynapse * >::iterator | smpaxon_begin () |
vector< SMPSynapse * >::iterator | smpaxon_end () |
AmIdInt | GetAxonID (unsigned int index) |
float | GetAxonWeight (unsigned int index) |
float | GetAxonDelay (unsigned int index) |
void | SetParentNet (Network *const ParNet) |
AmIdInt | GetID () |
LayerType | GetLayerType () |
void | SetLayerType (LayerType _layerType) |
void | SetTimeConstants (float synapticConst, float membraneConst) |
float | GetMembraneConst () const |
float | GetSynapticConst () const |
void | SetRefractory (float period) |
float | GetRefractory () const |
void | SetLearningConst (float learnConst) |
float | GetLearningConst () const |
void | SetRestPotential (float ptnl) |
float | GetRestPotential () const |
void | SetThresholdPotential (float ptnl) |
float | GetThresholdPotential () const |
void | TrainingOn (bool mode) |
bool | IsTraining () const |
void | Inhibitory (bool val) |
bool | Inhibitory () const |
PhysicalProperties * | GetPhysicalProperties () |
virtual const char * | ClassId ()=0 |
virtual float * | InitializeLookupTable (int index)=0 |
virtual float * | GetTableParams (int index, int &numParams)=0 |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
Static Public Methods | |
void | CaptureOutput (OutputMode mode) |
void | SetSpikeOutput (SpikeOutput *output) |
SpikeOutput * | GetSpikeOutput () |
void | EnforceSign (bool enforce) |
bool | EnforceSign () |
bool | GetMPMode () |
void | EnableSpikeBatching () |
Protected Methods | |
virtual void | InputSpike (SynapseItr &inSynapse, AmTimeInt inTime, unsigned int numSyn=0)=0 |
virtual void | SetMaxScaledWeight () |
virtual void | Train (AmTimeInt &spikeTime) |
void | SendSMPSpike (AmTimeInt &now) |
virtual int | SetLookupTables (FunctionLookup *funcRef)=0 |
void | RoundTime (AmTimeInt &time) |
Static Protected Methods | |
void | SetMPMode (bool mode) |
Protected Attributes | |
AmIdInt | nId |
LayerType | layerType |
bool | inhibitory |
float | memTimeConst |
float | synTimeConst |
float | refPeriod |
float | synPotConst |
float | synDepConst |
float | learningMax |
float | posLearnTimeConst |
float | negLearnTimeConst |
float | learningConst |
float | thresholdPtnl |
float | restPtnl |
float | membranePtnl |
float | maxThreshCrs |
float | convergeRes |
AmTimeInt | schedSpikeTime |
AmTimeInt | spikeTime |
AmTimeInt | currTime |
AmTimeInt | inputTime |
bool | trainingMode |
Network * | SNet |
int | axonSize |
int | initAxonSize |
float | maxScaledWeight |
vector< Synapse * > | axon |
vector< SynapseHist > | synapseHist |
vector< InputHist > | inputHist |
unsigned int | histBeginIdx |
vector< SMPSynapse * > | smpAxon |
unsigned int | pspLSize |
unsigned int | pspStepSize |
bool | usePspLookup |
PhysicalProperties | physicalProperties |
Static Protected Attributes | |
SpikeOutput * | spikeOutput |
bool | defaultOutputObj |
bool | enforceSign |
AmTimeInt | simStepSize |
bool | recordOutput |
OutputMode | outputMode |
Friends | |
class | Network |
class | MpNetwork |
void | MpSpikeInput::ReadInputBuffer () |
Neuron provides an interface for the implementation of integrate-and-fire model neurons. Neuron cannot be instantiated as an object itself, but can only be instantiated via a child class. Neuron does not place any restrictions on how child neurons are modeled other than requiring the implementation of a set of functions that will generally be unique to each model. Neuron implementors should also be aware that Amygdala is an event driven simulator and a Neuron will only interact with the rest of the network when it receives a spike or when it is scheduled to spike itself. Methods may be added in a future version to allow stepping simulations in which active Neurons are able to calculate their states for each time step. Neuron does provide a default Hebbian training method, but child classes are able to implement their own training methods if necessary.
Notes: Neurons must be added to a Network object before they can be connected to other Neurons and used in a simulation. This can be done either directly through the Network::AddNeuron() function, or it can be done by adding a Neuron to a Layer object (via Layer::AddNeuron()) and then adding the Layer to the Network. Neurons are connected to each other using the Network::ConnectNeurons() function. Layer also provides methods for connecting groups of Neurons. Network owns all Neuron pointers once they have been added.
|
Const iterator for the synapses in the axon |
|
Const reverse iterator for the synapses it the axon |
|
Iterator for the synapses in the axon |
|
Reverse iterator for the synapses in the axon |
|
|
|
|
|
Find the beginning of the axon.
|
|
Turn output on or off. Turning on will cause output neurons to call SpikeOutput::OutputEvent() every time they spike. NOTE: This function may change in a future version. Enabling and disabling output may be controlled through the SpikeOutput family of classes rather than through this call.
|
|
Get the class name. This is needed for xml tags. This must be implemented in all derived classes.
Implemented in AlphaNeuron. |
|
Enable spike batching mode. Simply calling this function enables spike batching and it cannot be turned off once it has been enabled. Off by default. If spike batching is enabled, then spike events are queued up until the end of the time step and then each Neuron receives all of its incoming spikes in one batch. This can sometimes result in more efficient processing (depending on how the child Neuron implements Neuron::InputSpike(). Under normal operation, Neuron::InputSpike() is called every time a spike is sent. Spike batching is always enabled if spike delays are being used.
|
|
|
|
|
|
Get the sign enforcement mode.
|
|
Allow the network to force neurons to be either inhibitory or excitatory. If false, Neurons can form both inhibitory and excitatory output connections.
|
|
Note: Axon delays are implemented as a delay between the spike time and the time that the output neuron receives the spike. This value can only be set when a connection is formed through the Network::ConnectNeurons() call, so no Set method is provided in Neuron.
|
|
|
|
|
|
|
|
|
|
Note: This will change to GetLayerRole() in a future version.
|
|
|
|
|
|
Get the multi-processing mode.
|
|
|
|
|
|
Get the value of the rest potential in mV.
|
|
Get a pointer to a SpikeOutput object.
|
|
|
|
This is an internal function and should only be called by FunctionLookup. This function will be either removed or made private for Amygdala 0.4.
Implemented in AlphaNeuron. |
|
|
|
Get the neuron sign.
|
|
Set this to true if this is is an inhibitory neuron. This function has no effect if neuron signs (positive or negative) are not being enforced.
|
|
Fill a lookup table and return a pointer to the first element. Neuron::SetTableDimensions() should be called first. This is an internal function and should only be called by FunctionLookup. This function will be made private or removed completely for Amygdala 0.4.
Implemented in AlphaNeuron. |
|
Send a spike to this Neuron. When spikes are grouped, this function will only be called once per step, but it can be called multiple times otherwise. This should only be called from other Neurons or the Network.
Implemented in AlphaNeuron. |
|
|
|
|
|
|
|
|
|
|
|
Round time to nearest simulation time step. This is done to make sure that the calculated neuron spiking times coincide with the simulation time steps.
|
|
Extend the Neuron::SendSpike() function. First, all local neurons receive the spike as usual. Then, the spike is sent to all other instances. TODO: Revise this note.
|
|
Set the number of output connections that will be added, if known. This should only be done BEFORE AddAxonSyn() has been called. Setting the number of outputs before adding them will often result in more efficient memory usage, but this is not required if the size is unknown.
|
|
Set the layer type for this neuron. This will change to SetNeuronRole in a future version.
|
|
Set the learning constant.
|
|
Query funcRef to see if a lookup table has already been generated for an identical neuron and retrieve a pointer to the table if it has. This is an internal function and should not be called by library users.
Implemented in AlphaNeuron. |
|
Determine the maximum value of a weight for this neuron and set maxScaledWeight to this value. This will be used as the multiplication factor to convert to and from the normalized weight values that are used in the public interface. NOTE: This function will be deprecated in version 0.4 if favor of normalizing PSP curves rather than recalculating normalized weights. Reimplemented in AlphaNeuron. |
|
Turn multi-processing mode on or off. Multi-processing mode includes both multi-threaded and clustered processing. Off by default.
|
|
Set a pointer to the parent network.
|
|
Set the length of the refractory period. Defaults to 2 ms if not set explicitely.
|
|
Set the value of the rest potential.
|
|
Set a pointer to a new output object. Neuron uses an instance of AmygSimpleOutput by default (until set by SetAmygOutput). Users are responsible for deleting any SpikeOutput objects that they instantiate and pass to Neuron.
|
|
Set the threshold potential.
|
|
Set the synaptic and membrane time constants. Default values may vary between child classes and some child classes may not use both constants.
|
|
|
|
|
|
Train the network after firing. This assumes that some sort of Hebbian learning will be used, but children of this class should be able to either overload this to do nothing (or turn training off) and provide alternative training methods with little consequence to the rest of the neuron code. This is generally called from SendSpike().
|
|
Set the training mode.
|
|
Input, Hidden, or Output layer. Will change to neuronRole in the future. |
|
Neuron ID -- unique in network |
|
represents synaptic connections to Neurons on Instances on other nodes The smpAxon vector contains only the instance Ids of the target Instance. The remote Instance needs to resolve which neurons get the spike based on our InstanceID and our neuron Id. |