PetaVision  Alpha
PV::RescaleConn Class Reference
Inheritance diagram for PV::RescaleConn:
PV::IdentConn PV::HyPerConn PV::BaseConnection PV::BaseObject PV::CheckpointerDataInterface PV::Observer

BaseConnection Parameters

List of parameters needed from the BaseConnection class

char * preLayerName
 
char * postLayerName
 
HyPerLayerpre
 
HyPerLayerpost
 
ChannelType channel
 
int numAxonalArborLists
 
bool plasticityFlag
 
bool convertRateToSpikeCount
 
bool receiveGpu
 
bool initializeFromCheckpointFlag = true
 
BaseConnectionProbe ** probes
 
int numProbes
 
bool initInfoCommunicatedFlag
 
bool dataStructuresAllocatedFlag
 
bool initialValuesSetFlag
 
int getDelayArraySize ()
 
virtual void ioParam_preLayerName (enum ParamsIOFlag ioFlag)
 preLayerName: Specifies the connection's pre layer More...
 
virtual void ioParam_postLayerName (enum ParamsIOFlag ioFlag)
 postLayerName: Specifies the connection's post layer More...
 
virtual void ioParam_delay (enum ParamsIOFlag ioFlag)
 delay: Specifies delay(s) which the post layer will receive data More...
 
virtual int respondConnectionUpdate (ConnectionUpdateMessage const *message)
 
virtual int respondConnectionFinalizeUpdate (ConnectionFinalizeUpdateMessage const *message)
 
virtual int respondConnectionOutput (ConnectionOutputMessage const *message)
 
virtual int initializeDelays (const float *fDelayArray, int size)
 
int maxDelaySteps ()
 
static int decodeChannel (int channel_code, ChannelType *channel_type)
 

HyPerConn Parameters

List of parameters needed from the HyPerConn class

virtual void ioParam_channelCode (enum ParamsIOFlag ioFlag) override
 channelCode: Specifies which channel in the post layer this connection is attached to More...
 
virtual void ioParam_triggerLayerName (enum ParamsIOFlag ioFlag)
 triggerLayerName: Specifies the layer to trigger weight updates
 
virtual void ioParam_triggerOffset (enum ParamsIOFlag ioFlag)
 triggerOffset: If trigger flag is set, triggers <triggerOffset> timesteps before target trigger More...
 
virtual void ioParam_immediateWeightUpdate (enum ParamsIOFlag ioFlag)
 immediateWeightUpdate: This flag is read for plastic connections with shared weights. If set to true, the change in weights is applied to the weights immediately at the end of the weight update period. If set to false, the change in weights is applied at the end of the next weight update, to allow for concurrent reduction in the shared weights.
 
virtual void ioParam_initialWriteTime (enum ParamsIOFlag ioFlag)
 initialWriteTime: If writeStep is >= 0, sets the initial write time of the connection.
 
virtual void ioParam_shrinkPatchesThresh (enum ParamsIOFlag ioFlag)
 shrinkPatchesThresh: If shrinkPatches flag is set, specifies threshold to consider weight as zero
 
virtual void ioParam_dWMax (enum ParamsIOFlag ioFlag)
 dWMax: If plasticity flag is set, specifies the learning rate of the weight updates.
 
virtual void ioParam_normalizeDw (enum ParamsIOFlag ioFlag)
 normalizeDw: Specifies if this connection is averaging gradients (true) or summing them (false)
 
virtual void ioParam_useMask (enum ParamsIOFlag ioFlag)
 useMask: Specifies if this connection is using a post mask for learning
 
virtual void ioParam_maskLayerName (enum ParamsIOFlag ioFlag)
 maskLayerName: If using mask, specifies the layer to use as a binary mask layer
 
virtual void ioParam_maskFeatureIdx (enum ParamsIOFlag ioFlag)
 maskLayerName: If using mask, specifies which feature dim to use for the mask More...
 
virtual void ioParam_gpuGroupIdx (enum ParamsIOFlag ioFlag)
 gpuGroupIdx: All connections in the same group uses the same GPU memory for weights More...
 
virtual void ioParam_weightSparsity (enum ParamsIOFlag ioFlag)
 weightSparsity: Specifies what percentage of weights will be ignored. Default is 0.0
 
virtual void ioParam_dWMaxDecayInterval (enum ParamsIOFlag ioFlag)
 
virtual void ioParam_dWMaxDecayFactor (enum ParamsIOFlag ioFlag)
 

HyPerConn Parameters

List of parameters needed from the HyPerConn class

void ioParam_scale (enum ParamsIOFlag ioFlag)
 

Public Types

enum  AccumulateType { UNDEFINED, CONVOLVE, STOCHASTIC }
 

Public Member Functions

 RescaleConn (char const *name, HyPerCol *hc)
 
virtual void addClone (PlasticCloneConn *conn)
 
virtual int allocateDataStructures () override
 
virtual int communicateInitInfo (CommunicateInitInfoMessage const *message) override
 
virtual double computeNewWeightUpdateTime (double time, double currentUpdateTime)
 
PVPatch *** convertPreSynapticWeights (double time)
 
virtual int dataIndexToUnitCellIndex (int dataIndex, int *kx=NULL, int *ky=NULL, int *kf=NULL)
 
virtual int deliver () override
 
virtual void deliverOnePostNeuronActivity (int arborID, int kTargetExt, int inSy, float *activityStartBuf, float *gSynPatchPos, float dt_factor, taus_uint4 *rngPtr)
 
virtual void deliverOnePreNeuronActivity (int patchIndex, int arbor, float a, float *postBufferStart, void *auxPtr)
 
virtual int finalizeUpdate (double timed, double dt) override
 
int fPatchSize ()
 
int fPatchStride ()
 
int fPostPatchSize ()
 
long * get_activations (int arborId)
 
long * get_activations (int arborId, int patchIndex)
 
long * get_activationsHead (int arborId, int dataIndex)
 
float * get_dwData (int arborId, int patchIndex)
 
float * get_dwDataHead (int arborId, int dataIndex)
 
float * get_dwDataStart (int arborId)
 
float * get_wData (int arborId, int patchIndex)
 
float * get_wDataHead (int arborId, int dataIndex)
 
float * get_wDataStart (int arborId)
 
bool getAllocDeviceWeights ()
 
bool getAllocPostDeviceWeights ()
 
size_t getAPostOffset (int kPre, int arborId)
 
ChannelType getChannel ()
 
bool getConvertRateToSpikeCount ()
 
bool getDataStructuresAllocatedFlag ()
 
int getDelay (int arbor)
 
std::string const & getDescription () const
 
char const * getDescription_c () const
 
PVCuda::CudaBuffer * getDeviceGSynPatchStart ()
 
PVCuda::CudaBuffer * getDevicePatches ()
 
virtual PVCuda::CudaBuffer * getDeviceWData ()
 
float getDWMax ()
 
size_t getGSynPatchStart (int kPre, int arborId)
 
size_t ** getGSynPatchStart ()
 
bool getInitialValuesSetFlag ()
 
bool getInitInfoCommunicatedFlag ()
 
char const * getKeyword () const
 
PVCuda::CudaRecvPostgetKrRecvPost ()
 
PVCuda::CudaRecvPregetKrRecvPre ()
 
double getLastTimeUpdateCalled ()
 
double getLastUpdateTime ()
 
MPIBlock const * getMPIBlock ()
 
char const * getName () const
 
bool getNormalizeDwFlag ()
 
NormalizeBasegetNormalizer ()
 
int getNumDataPatches ()
 
int getNumDataPatchesF ()
 
int getNumDataPatchesX ()
 
int getNumDataPatchesY ()
 
int getNumProbes ()
 
int getNumWeightPatches ()
 
virtual int * getPatchToDataLUT ()
 
float * getPlasticIncr (int kPre, int arborId)
 
virtual PVLayerCubegetPlasticityDecrement ()
 
bool getPlasticityFlag ()
 
HyPerLayergetPost ()
 
const PVPatchStridesgetPostExtStrides ()
 
const char * getPostLayerName ()
 
const PVPatchStridesgetPostNonextStrides ()
 
virtual long * getPostToPreActivity ()
 
HyPerLayergetPre ()
 
const char * getPreLayerName ()
 
BaseConnectionProbegetProbe (int i)
 
AccumulateType getPvpatchAccumulateType ()
 
taus_uint4getRandState (int index)
 
bool getReceiveGpu ()
 
bool getSelfFlag ()
 
bool getShrinkPatches_flag ()
 
bool getUpdateGSynFromPostPerspective ()
 
InitWeightsgetWeightInitializer ()
 
virtual PVPatch * getWeights (int kPre, int arborId)
 
double getWeightUpdatePeriod ()
 
double getWeightUpdateTime ()
 
float getWMax ()
 
float getWMin ()
 
float * getWPostData (int arbor, int patchIndex)
 
float * getWPostData (int arbor)
 
PVPatch * getWPostPatches (int arbor, int patchIndex)
 
virtual int initializeState () overridefinal
 
virtual void initPatchToDataLUT ()
 
virtual int insertProbe (BaseConnectionProbe *p) override
 
int ioParams (enum ParamsIOFlag ioFlag)
 
bool isUsingGPU () const
 
virtual float maxWeight (int arborId=0)
 
virtual float minWeight (int arborId=0)
 
virtual bool needUpdate (double time, double dt) override
 
int numberOfAxonalArborLists ()
 
int outputProbeParams () override
 
virtual int outputState (double time) override
 
virtual int patchIndexToDataIndex (int patchIndex, int *kx=NULL, int *ky=NULL, int *kf=NULL)
 
virtual int patchToDataLUT (int patchIndex)
 
PVPatch **** point2PreSynapticWeights ()
 
HyPerLayerpostSynapticLayer ()
 
int postSynapticPatchHead (int kPre, int *kxPostOut, int *kyPostOut, int *kfPostOut, int *dxOut, int *dyOut, int *nxpOut, int *nypOut)
 
HyPerLayerpreSynapticLayer ()
 
int preSynapticPatchHead (int kxPost, int kyPost, int kfPost, int *kxPre, int *kyPre)
 
virtual int respond (std::shared_ptr< BaseMessage const > message) override
 
virtual void setAllocDeviceWeights ()
 
virtual void setAllocPostDeviceWeights ()
 
void setDeviceWData (PVCuda::CudaBuffer *inBuf)
 
void setNeedAllocPostWeights (bool inBool)
 
void setNeedPost ()
 
int shrinkPatch (int kExt, int arborId)
 
virtual int shrinkPatches (int arborId)
 
int sumWeights (int nx, int ny, int offset, float *dataStart, double *sum, double *sum2, float *maxVal)
 
int updateInd_dW (int arborID, int batchID, float const *preLayerData, float const *postLayerData, int kExt)
 
virtual int updateState (double time, double dt) override
 
virtual int updateWeights (int axonID) override
 
bool usingSharedWeights ()
 
PVPatch ** weights (int arborId=0)
 
virtual int writeTextWeights (const char *filename, bool verifyWrites, int k)
 
virtual int writeTextWeightsExtra (PrintStream *pvstream, int k, int arborID)
 
virtual int writeWeights (double timed)
 
virtual int writeWeights (const char *filename, bool verifyWrites)
 
virtual int writeWeights (PVPatch ***patches, float **dataStart, int numPatches, FileStream *fileStream, double timef, bool compressWeights, bool last)
 
int xPatchSize ()
 
int xPatchStride ()
 
int xPostPatchSize ()
 
int yPatchSize ()
 
int yPatchStride ()
 
int yPostPatchSize ()
 

Static Public Member Functions

static PVPatch ** createPatches (int nPatches, int nx, int ny)
 
static int deletePatches (PVPatch **patchpointers)
 
static void pvpatch_adjust (PVPatch *p, int sx, int sy, int nxNew, int nyNew, int dx, int dy)
 
static void pvpatch_init (PVPatch *p, int nx, int ny)
 

Data Fields

int(* accumulateFunctionFromPostPointer )(int kPreRes, int nk, float *v, float *a, float *w, float dt_factor, void *auxPtr, int sf)
 
int(* accumulateFunctionPointer )(int kPreRes, int nk, float *v, float a, float *w, void *auxPtr, int sf)
 

Protected Member Functions

virtual int adjustAllPatches (int nxPre, int nyPre, int nfPre, const PVHalo *haloPre, int nxPost, int nyPost, int nfPost, const PVHalo *haloPost, PVPatch ***inWPatches, size_t **inGSynPatchStart, size_t **inAPostOffset, int arborId)
 
virtual int adjustAxonalArbors (int arborId)
 
virtual int allocateDeviceBuffers ()
 
virtual int allocateDeviceWeights ()
 
virtual int allocatePostConn ()
 
virtual int allocatePostDeviceWeights ()
 
virtual int allocatePostToPreBuffer ()
 
virtual float * allocWeights (int nPatches, int nxPatch, int nyPatch, int nfPatch)
 
void blockingNormalize_dW ()
 
int calcUnitCellIndex (int patchIndex, int *kxUnitCellIndex=NULL, int *kyUnitCellIndex=NULL, int *kfUnitCellIndex=NULL)
 
int checkPatchDimensions ()
 
virtual int checkPatchSize (int patchSize, int scalePre, int scalePost, char dim)
 
void checkpointWeightPvp (Checkpointer *checkpointer, char const *bufferName, float **weightDataBuffer)
 
virtual int cleanup () override
 
virtual int clear_dW (int arborId)
 
virtual int clear_numActivations (int arborId)
 
int clearWeights (float **dataStart, int numPatches, int nx, int ny, int nf)
 
virtual int constructWeights ()
 
virtual int copyInitialStateToGPU ()
 
virtual int createArbors ()
 
void createArborsOutOfMemory ()
 
virtual InitWeightscreateInitWeightsObject (const char *weightInitTypeStr)
 
virtual int createWeights (PVPatch ***patches, int nWeightPatches, int nDataPatches, int nxPatch, int nyPatch, int nfPatch, int arborId)
 
int createWeights (PVPatch ***patches, int arborId)
 
void decay_dWMax ()
 
virtual int deliverPostsynapticPerspective (PVLayerCube const *activity, int arborID)
 
virtual int deliverPostsynapticPerspectiveConvolve (PVLayerCube const *activity, int arborID, int *numActive, int **activeList)
 
virtual int deliverPostsynapticPerspectiveGPU (PVLayerCube const *activity, int arborID)
 
virtual int deliverPostsynapticPerspectiveStochastic (PVLayerCube const *activity, int arborID, int *numActive, int **activeList)
 
virtual int deliverPresynapticPerspective (PVLayerCube const *activity, int arborID) override
 
virtual int deliverPresynapticPerspectiveConvolve (PVLayerCube const *activity, int arborID)
 
virtual int deliverPresynapticPerspectiveGPU (PVLayerCube const *activity, int arborID)
 
virtual int deliverPresynapticPerspectiveStochastic (PVLayerCube const *activity, int arborID)
 
long ** get_activations ()
 
float ** get_dwDataStart ()
 
float ** get_wDataStart ()
 
PVPatch *** get_wPatches ()
 
size_t ** getAPostOffset ()
 
double getConvertToRateDeltaTimeFactor ()
 
virtual InitWeightsgetDefaultInitWeightsMethod (const char *keyword)
 
int getPreAndPostLayerNames (const char *name, char **preLayerNamePtr, char **postLayerNamePtr)
 
virtual void handleDefaultSelfFlag () override
 
virtual int handleMissingPreAndPostLayerNames ()
 
int initialize (char const *name, HyPerCol *hc)
 
virtual int initialize_dW (int arborId)
 
virtual int initializeReceivePostKernelArgs ()
 
virtual int initializeReceivePreKernelArgs ()
 
virtual PVPatch *** initializeWeights (PVPatch ***arbors, float **dataStart)
 
virtual int initNumDataPatches ()
 
virtual int initNumWeightPatches ()
 
virtual int initPlasticityPatches ()
 
virtual void ioParam_combine_dW_with_W_flag (enum ParamsIOFlag ioFlag) override
 combine_dW_with_W_flag: If plasticity flag is set, specifies if dW buffer is allocated More...
 
virtual void ioParam_convertRateToSpikeCount (enum ParamsIOFlag ioFlag) override
 convertRateToSpikeCount: If true, presynaptic activity should be converted from a rate to a count. More...
 
virtual void ioParam_initializeFromCheckpointFlag (enum ParamsIOFlag ioFlag) override
 initializeFromCheckpointFlag: If set to true, initialize using checkpoint direcgtory set in HyPerCol. More...
 
void ioParam_initialWeightUpdateTime (enum ParamsIOFlag ioFlag) override
 initialWeightUpdateTime: If plasticity flag is set, specifies the inital weight update time; ignored if triggerFlag = true
 
virtual void ioParam_nfp (enum ParamsIOFlag ioFlag) override
 nfp: Specifies the post feature patch size
 
virtual void ioParam_normalizeMethod (enum ParamsIOFlag ioFlag) override
 normalizeMethod: Specifies the normalization method for weights More...
 
virtual void ioParam_numAxonalArbors (enum ParamsIOFlag ioFlag) override
 numAxonalArbors: Specifies the number of arbors to use in this connection
 
virtual void ioParam_nxp (enum ParamsIOFlag ioFlag) override
 nxp: Specifies the x patch size More...
 
virtual void ioParam_nyp (enum ParamsIOFlag ioFlag) override
 nyp: Specifies the y patch size More...
 
virtual void ioParam_plasticityFlag (enum ParamsIOFlag ioFlag) override
 plasticityFlag: Specifies if the weights will update
 
virtual void ioParam_pvpatchAccumulateType (enum ParamsIOFlag ioFlag) override
 pvpatchAccumulateType: Specifies the method to accumulate synaptic input More...
 
virtual void ioParam_receiveGpu (enum ParamsIOFlag ioFlag) override
 receiveGpu: If PetaVision was compiled with GPU acceleration and this flag is set to true, the connection uses the GPU to update the postsynaptic layer's GSyn. If compiled without GPU acceleration, it is an error to set this flag to true.
 
virtual void ioParam_selfFlag (enum ParamsIOFlag ioFlag) override
 selfFlag: Indicates if pre and post is the same layer. More...
 
virtual void ioParam_sharedWeights (enum ParamsIOFlag ioFlag) override
 sharedWeights: Defines if the HyPerConn uses shared weights (kernelConn)
 
virtual void ioParam_shrinkPatches (enum ParamsIOFlag ioFlag) override
 shrinkPatches: Optimization for shrinking a patch to it's non-zero values
 
virtual void ioParam_updateGSynFromPostPerspective (enum ParamsIOFlag ioFlag) override
 updateGSynFromPostPerspective: Specifies if the connection should push from pre or pull from post.
 
virtual void ioParam_weightInitType (enum ParamsIOFlag ioFlag) override
 weightInitType: Specifies the initialization method of weights More...
 
void ioParam_weightUpdatePeriod (enum ParamsIOFlag ioFlag) override
 weightUpdatePeriod: If plasticity flag is set and there is no trigger layer, specifies the update period of weights. This parameter is required. To specify updating every time period, make the weightUpdatePeriod no bigger than the parent HyPerCol's dt parameter.
 
virtual void ioParam_writeCompressedCheckpoints (enum ParamsIOFlag ioFlag) override
 writeCompressedCheckpoints: Checkpoint weights are written compressed. More...
 
virtual void ioParam_writeCompressedWeights (enum ParamsIOFlag ioFlag) override
 writeCompressedWeights: If writeStep >= 0, weights written out are bytes as opposed to floats.
 
virtual void ioParam_writeStep (enum ParamsIOFlag ioFlag) override
 writeStep: Specifies the write period of the connection. More...
 
int ioParamsFillGroup (enum ParamsIOFlag ioFlag) override
 
void normalize_dW ()
 
virtual int normalize_dW (int arbor_ID)
 
void openOutpuStateFile (Checkpointer *checkpointer)
 
void openOutputStateFile (Checkpointer *checkpointer)
 
size_t patchStartIndex (int patchIndex)
 
size_t postPatchStartIndex (int patchIndex)
 
virtual int prepareCheckpointWrite () override
 
virtual int processCheckpointRead ()
 
virtual int readStateFromCheckpoint (Checkpointer *checkpointer) override
 
void reduce_dW ()
 
virtual int reduce_dW (int arborId)
 
void reduceAcrossBatch (int arborID)
 
virtual int reduceActivations (int arborID)
 
virtual int reduceKernels (int arborID)
 
virtual int registerData (Checkpointer *checkpointer) override
 
void registerTimers (Checkpointer *checkpointer)
 
int respondAllocateData (AllocateDataMessage const *message)
 
int respondCleanup (CleanupMessage const *message)
 
int respondCommunicateInitInfo (CommunicateInitInfoMessage const *message)
 
int respondCopyInitialStateToGPUMessage (CopyInitialStateToGPUMessage const *message)
 
int respondInitializeState (InitializeStateMessage const *message)
 
int respondPrepareCheckpointWrite (PrepareCheckpointWriteMessage const *message)
 
int respondProcessCheckpointRead (ProcessCheckpointReadMessage const *message)
 
int respondReadStateFromCheckpoint (ReadStateFromCheckpointMessage< Checkpointer > const *message)
 
int respondRegisterData (RegisterDataMessage< Checkpointer > const *message)
 
void set_dwDataStart (float **datastart)
 
void set_dwDataStart (int arborId, float *pIncrStart)
 
void set_wDataStart (float **datastart)
 
void set_wDataStart (int arborId, float *pDataStart)
 
void set_wPatches (PVPatch ***patches)
 
void setAPostOffset (size_t **postoffset)
 
void setChannelType (ChannelType ch)
 
void setConvertRateToSpikeCount (bool convertRateToSpikeCountFlag)
 
void setDataStructuresAllocatedFlag ()
 
void setDelay (int arborId, double delay)
 
virtual int setDescription ()
 
void setGSynPatchStart (size_t **patchstart)
 
virtual int setInitialValues () override
 
void setInitialValuesSetFlag ()
 
void setInitInfoCommunicatedFlag ()
 
int setName (char const *name)
 
void setNumberOfAxonalArborLists (int numArbors)
 
int setParent (HyPerCol *hc)
 
virtual int setPatchSize ()
 
virtual int setPatchStrides ()
 
int setPostLayerName (const char *post_name)
 
virtual int setPostPatchSize ()
 
virtual int setPreAndPostLayerNames ()
 
int setPreLayerName (const char *pre_name)
 
void setReceiveGpu ()
 
virtual int setWeightInitializer () override
 
int setWeightNormalizer ()
 
virtual bool skipPre (float preact)
 
virtual int update_dW (int arborID)
 
void updateArbors ()
 
virtual void updateDeviceWeights ()
 
void updateLocal_dW ()
 
virtual float updateRule_dW (float pre, float post)
 
void updateWeightsDelayed (double simTime, double dt)
 
void updateWeightsImmediate (double simTime, double dt)
 
void wait_dWReduceRequests ()
 

Static Protected Member Functions

static int adjustedPatchDimension (int zPre, int preNeuronsPerPostNeuron, int postNeuronsPerPreNeuron, int nPost, int patchDim, int *postStartPtr, int *patchStartPtr, int *adjustedDim)
 
static int inferPreAndPostFromConnName (const char *name, int rank, char **preLayerNamePtr, char **postLayerNamePtr)
 

Protected Attributes

bool allocDeviceWeights
 
bool allocPostDeviceWeights
 
bool * batchSkip
 
std::vector< PlasticCloneConn * > clones
 
bool combine_dW_with_W_flag
 
bool combineWeightFiles
 
PVCuda::CudaBuffer * d_GSynPatchStart
 
PVCuda::CudaBuffer * d_Patch2DataLookupTable
 
PVCuda::CudaBuffer * d_Patches
 
PVCuda::CudaBuffer * d_PostToPreActivity
 
PVCuda::CudaBuffer * d_WData
 
std::string description
 
float dWMax
 
int fileparams [NUM_WGT_PARAMS]
 
int fileType
 
int gpuGroupIdx
 
double initialWeightUpdateTime
 
double initialWriteTime
 
Timerio_timer
 
PVCuda::CudaRecvPostkrRecvPost
 
PVCuda::CudaRecvPrekrRecvPre
 
double lastTimeUpdateCalled
 
double lastUpdateTime
 
std::vector< MPI_Request > m_dWReduceRequests
 
HyPerLayermask
 
int maskFeatureIdx
 
char * maskLayerName
 
bool mDataStructuresAllocatedFlag = false
 
float mDWMaxDecayFactor = 0.0f
 
int mDWMaxDecayInterval = 0
 
int mDWMaxDecayTimer = 0
 
bool mImmediateWeightUpdate = true
 
bool mInitialValuesSetFlag = false
 
bool mInitInfoCommunicatedFlag = false
 
int mNumDataPatchesF
 
int mNumDataPatchesX
 
int mNumDataPatchesY
 
CheckpointableFileStreammOutputStateStream = nullptr
 
bool mReductionPending = false
 
bool mUsingGPUFlag = false
 
char * name = nullptr
 
bool needAllocPostWeights
 
bool needFinalize
 
int nfp
 
int nfpPost
 
bool normalizeDwFlag
 
char * normalizeMethod
 
NormalizeBasenormalizer
 
bool normalizeTotalToPost
 
int numDataPatches
 
long ** numKernelActivations
 
int numParams
 
int numWeightPatches
 
int nxp
 
int nxpPost
 
int nyp
 
int nypPost
 
HyPerColparent = nullptr
 
HyPerConnpostConn
 
AccumulateType pvpatchAccumulateType
 
char * pvpatchAccumulateTypeString
 
RandomrandState
 
float scale
 
bool selfFlag
 
int sfp
 
bool sharedWeights
 
bool shrinkPatches_flag
 
float shrinkPatchesThresh
 
int sxp
 
bool symmetrizeWeightsFlag
 
int syp
 
float ** thread_gSyn
 
bool triggerFlag
 
HyPerLayertriggerLayer
 
char * triggerLayerName
 
double triggerOffset
 
Timerupdate_timer
 
bool updateGSynFromPostPerspective
 
bool useListOfArborFiles
 
bool useMask
 
bool warnDefaultNfp
 
InitWeightsweightInitializer
 
char * weightInitTypeString
 
double weightUpdatePeriod
 
double weightUpdateTime
 
float wMax
 
float wMin
 
float ** wPostDataStart
 
float *** wPostDataStartp
 
PVPatch *** wPostPatches
 
PVPatch **** wPostPatchesp
 
double wPostTime
 
bool writeCompressedCheckpoints
 
bool writeCompressedWeights
 
double writeStep
 
double writeTime
 

Private Member Functions

int initialize_base ()
 

Detailed Description

Definition at line 15 of file RescaleConn.hpp.

Member Function Documentation

int PV::HyPerConn::adjustAxonalArbors ( int  arborId)
protectedvirtualinherited
  • Each neuron in the pre-synaptic layer projects a number of axonal arbors to the post-synaptic layer (Can they be projected accross columns too?).
  • numAxons is the number of axonal arbors projected by each neuron.
  • Each axonal arbor (PVAxonalArbor) connects to a patch of neurons in the post-synaptic layer.
  • The PVAxonalArbor structure contains STDP P variable.

REMARKS:

  • numArbors = (nxPre + 2*prePad)*(nyPre+2*prePad) = nxexPre * nyexPre This is the total number of weight patches for a given arbor. Is the number of pre-synaptic neurons including margins.
  • activity and STDP M variable are extended into margins

Definition at line 4026 of file HyPerConn.cpp.

void PV::HyPerConn::blockingNormalize_dW ( )
protectedinherited

If there are outstanding MPI requests for reducing dW, wait for them to complete and then call normalize_dW(). This function is called in two situations: when writing a checkpoint * (so that we don't have to separately checkpoint the number of activation kernels) and in timesteps where the weights need to be updated (and now need the calculation of dW to be complete).

Definition at line 2383 of file HyPerConn.cpp.

int PV::IdentConn::communicateInitInfo ( CommunicateInitInfoMessage const *  message)
overridevirtualinherited

communicateInitInfo is used to allow connections and layers to set params and related member variables based on what other layers or connections are doing. (For example, CloneConn sets many parameters the same as its originalConn.) After a connection is constructed, it is not properly initialized until communicateInitInfo(), allocateDataStructures(), and initializeState() have been called.

Return values: PV_POSTPONE means that communicateInitInfo() cannot be run until other layers'/connections' own communicateInitInfo() have been run successfully.

PV_SUCCESS and PV_FAILURE have their usual meanings.

communicateInitInfo() is called by passing a CommunicateInitInfoMessage to respond(), which is usually done in HyPerCol::run.

Reimplemented from PV::HyPerConn.

Definition at line 224 of file IdentConn.cpp.

int PV::HyPerConn::constructWeights ( )
protectedvirtualinherited

REMARKS:

  • Each neuron in the pre-synaptic layer can project "up" a number of arbors. Each arbor connects to a patch in the post-synaptic layer.
  • writeTime and writeStep are used to write post-synaptic patches.These patches are written every writeStep.

Reimplemented in PV::PlasticCloneConn, PV::CloneConn, PV::PoolingConn, PV::TransposeConn, PV::TransposePoolingConn, and PV::privateTransposeConn.

Definition at line 269 of file HyPerConn.cpp.

int PV::HyPerConn::createWeights ( PVPatch ***  patches,
int  arborId 
)
protectedinherited

Create a separate patch of weights for every neuron

Definition at line 3818 of file HyPerConn.cpp.

void PV::HyPerConn::decay_dWMax ( )
protectedinherited

Decrements the counter for dWMaxDecayInterval, and if at the end of the interval, decays the dWMax value.

Definition at line 2421 of file HyPerConn.cpp.

static int PV::BaseConnection::decodeChannel ( int  channel_code,
ChannelType *  channel_type 
)
inlinestaticinherited

Type-safe method of translating an integer channel_code into an allowed channel type. If channel_code corresponds to a recognized channel type, *channel_type is set accordingly and the function returns successfully. Otherwise, *channel_type is undefined and the function returns PV_FAILURE.

Definition at line 421 of file BaseConnection.hpp.

int PV::HyPerConn::deliver ( )
overridevirtualinherited

Uses presynaptic layer's activity to modify the postsynaptic GSyn or thread_gSyn

Implements PV::BaseConnection.

Reimplemented in PV::privateTransposeConn.

Definition at line 2882 of file HyPerConn.cpp.

int PV::HyPerConn::finalizeUpdate ( double  timed,
double  dt 
)
overridevirtualinherited

A virtual function for performing any necessary updates after the normalizers are called.

Reimplemented from PV::BaseConnection.

Reimplemented in PV::CloneConn, PV::PoolingConn, PV::privateTransposeConn, and PV::TransposeConn.

Definition at line 2483 of file HyPerConn.cpp.

bool PV::BaseObject::getDataStructuresAllocatedFlag ( )
inlineinherited

Get-method for mDataStructuresAllocatedFlag, which is false on initialization and then becomes true once setDataStructuresAllocatedFlag() is called.

Definition at line 65 of file BaseObject.hpp.

int PV::BaseConnection::getDelay ( int  arbor)
inlineinherited

Returns the delay (in timesteps) belonging the given arbor.

Definition at line 156 of file BaseConnection.hpp.

bool PV::BaseObject::getInitialValuesSetFlag ( )
inlineinherited

Get-method for mInitialValuesSetFlag, which is false on initialization and then becomes true once setInitialValuesSetFlag() is called.

Definition at line 71 of file BaseObject.hpp.

bool PV::BaseObject::getInitInfoCommunicatedFlag ( )
inlineinherited

Get-method for mInitInfoCommunicatedFlag, which is false on initialization and then becomes true once setInitInfoCommunicatedFlag() is called.

Definition at line 58 of file BaseObject.hpp.

double PV::HyPerConn::getLastTimeUpdateCalled ( )
inlineinherited

Returns the last time that the connection's updateState function was called. Provided so that connections that depend on other connections (e.g. CopyConn) can postpone their update until the connection they depend has processed its updateState call.

Definition at line 163 of file HyPerConn.hpp.

double PV::HyPerConn::getLastUpdateTime ( )
inlineinherited

Returns the last time that weights were updated.

Definition at line 156 of file HyPerConn.hpp.

int PV::BaseConnection::getNumProbes ( )
inlineinherited

Returns the number of probes that have been attached to this connection

Definition at line 166 of file BaseConnection.hpp.

int PV::BaseConnection::getPreAndPostLayerNames ( const char *  name,
char **  preLayerNamePtr,
char **  postLayerNamePtr 
)
protectedinherited

Sets *preLayerNamePtr and *postLayerNamePtr according to the preLayerName and postLayerName parameters in the parameter group specified by the name and params arguments.

Definition at line 190 of file BaseConnection.cpp.

BaseConnectionProbe* PV::BaseConnection::getProbe ( int  i)
inlineinherited

Returns the probe with the indicated position in the list of probes. It does not do sanity checking on the value of i.

Definition at line 172 of file BaseConnection.hpp.

float PV::HyPerConn::getWMax ( )
inlineinherited

Maximum allowed weight value

Definition at line 184 of file HyPerConn.hpp.

float PV::HyPerConn::getWMin ( )
inlineinherited

Minimum allowed weight value

Definition at line 181 of file HyPerConn.hpp.

int PV::BaseConnection::handleMissingPreAndPostLayerNames ( )
protectedvirtualinherited

Called by BaseConnection::communicateInitInfo of the params did not set pre- and post- layers.

Reimplemented in PV::FeedbackConn.

Definition at line 106 of file BaseConnection.cpp.

int PV::BaseConnection::inferPreAndPostFromConnName ( const char *  name,
int  rank,
char **  preLayerNamePtr,
char **  postLayerNamePtr 
)
staticprotectedinherited

The default behavior of BaseConnection::handleMissingPreAndPostLayerNames. It tries to parse the name argument of the connection in the form "PreLayerToPostLayer". Then "PreLayer" put into *preLayerNamePtr and "PostLayer" is put into *postLayerNamePtr, and PV_SUCCESS is returned. If name does not contain the string "To", or if it contains it in more than one place, then PV_FAILURE is returned and *preLayerNamePtr and *postLayerNamePtr are not changed. rank is the rank of the process under MPI; the root process will print a message to the error stream if the routine fails; non-root process will not. This routine uses malloc to fill *{pre,post}LayerNamePtr, so the routine calling this one is responsible for freeing them.

Definition at line 111 of file BaseConnection.cpp.

int PV::HyPerConn::initialize_dW ( int  arborId)
protectedvirtualinherited

Initializes dW. Default behaviour is to clear dW.

Reimplemented in PV::ImprintConn.

Definition at line 2472 of file HyPerConn.cpp.

int PV::BaseConnection::initializeDelays ( const float *  fDelayArray,
int  size 
)
protectedvirtualinherited

Allocates the delays array and calls setDelay() for each arbor. fDelayArray is an array of length size, of delays, measured in the same units as the parent HyPerCol's dt.

If size=0, all delays are set to zero. If size=1, all delays are set to fDelayArray[0] If size=numArbors, delays[k] is calculated from fDelayArray[k]. If size is any other value, it is an error.

Reimplemented in PV::privateTransposeConn.

Definition at line 542 of file BaseConnection.cpp.

int PV::BaseConnection::initializeState ( )
finaloverridevirtualinherited

initializeState is used to set the initial values of the connection.

initializeState() is typically called by passing an InitializeStateMessage to respond(), which is usually done in HyPerCol::run.

Reimplemented from PV::BaseObject.

Definition at line 599 of file BaseConnection.cpp.

int PV::HyPerConn::insertProbe ( BaseConnectionProbe p)
overridevirtualinherited

Adds the given probe to the list of probes.

Reimplemented from PV::BaseConnection.

Definition at line 2225 of file HyPerConn.cpp.

void PV::HyPerConn::ioParam_channelCode ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

channelCode: Specifies which channel in the post layer this connection is attached to

Channels can be -1 for no update, or >= 0 for channel number.
0 is excitatory, 1 is inhibitory

Reimplemented from PV::BaseConnection.

Reimplemented in PV::GapConn.

Definition at line 582 of file HyPerConn.cpp.

void PV::IdentConn::ioParam_combine_dW_with_W_flag ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

combine_dW_with_W_flag: If plasticity flag is set, specifies if dW buffer is allocated

dW buffer, if not allocated, will point to weight buffer and accumulate weights as it gets them

Reimplemented from PV::HyPerConn.

Definition at line 156 of file IdentConn.cpp.

void PV::IdentConn::ioParam_convertRateToSpikeCount ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

convertRateToSpikeCount: If true, presynaptic activity should be converted from a rate to a count.

If this flag is true and the presynaptic layer is not spiking, the activity will be interpreted as a spike rate, and will be converted to a spike count when delivering activity to the postsynaptic GSyn buffer. If this flag is false, activity will not be converted.

Reimplemented from PV::BaseConnection.

Definition at line 126 of file IdentConn.cpp.

void PV::BaseConnection::ioParam_delay ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

delay: Specifies delay(s) which the post layer will receive data

: Delays are specified in units of dt, but are rounded to be integer multiples of dt. If delay is a scalar, all arbors of the connection have that value of delay. If delay is an array, the length must match the number of arbors and the arbors are assigned the delays sequentially.

Definition at line 302 of file BaseConnection.cpp.

void PV::HyPerConn::ioParam_gpuGroupIdx ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

gpuGroupIdx: All connections in the same group uses the same GPU memory for weights

Specify a group index. An index of -1 means no group (default). This parameter is ignored if PetaVision was compiled without GPU acceleration.

Definition at line 568 of file HyPerConn.cpp.

void PV::IdentConn::ioParam_initializeFromCheckpointFlag ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

initializeFromCheckpointFlag: If set to true, initialize using checkpoint direcgtory set in HyPerCol.

Checkpoint read directory must be set in HyPerCol to initialize from checkpoint.

Reimplemented from PV::BaseConnection.

Definition at line 64 of file IdentConn.cpp.

void PV::HyPerConn::ioParam_maskFeatureIdx ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

maskLayerName: If using mask, specifies which feature dim to use for the mask

Defaults to -1, which means point wise mask

Definition at line 977 of file HyPerConn.cpp.

void PV::IdentConn::ioParam_normalizeMethod ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

normalizeMethod: Specifies the normalization method for weights

Weights will be normalized after initialization and after each weight update. Possible choices are:

Further parameters are needed depending on initialization type.

Reimplemented from PV::HyPerConn.

Definition at line 77 of file IdentConn.cpp.

void PV::IdentConn::ioParam_nxp ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

nxp: Specifies the x patch size

If one pre to many post, nxp restricted to many * an odd number If many pre to one post or one pre to one post, nxp restricted to an odd number

Reimplemented from PV::HyPerConn.

Definition at line 184 of file IdentConn.cpp.

void PV::IdentConn::ioParam_nyp ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

nyp: Specifies the y patch size

If one pre to many post, nyp restricted to many * an odd number If many pre to one post or one pre to one post, nyp restricted to an odd number

Reimplemented from PV::HyPerConn.

Definition at line 191 of file IdentConn.cpp.

void PV::BaseConnection::ioParam_postLayerName ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

postLayerName: Specifies the connection's post layer

Required parameter

Reimplemented in PV::FeedbackConn.

Definition at line 274 of file BaseConnection.cpp.

void PV::BaseConnection::ioParam_preLayerName ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

preLayerName: Specifies the connection's pre layer

Required parameter

Reimplemented in PV::FeedbackConn.

Definition at line 269 of file BaseConnection.cpp.

void PV::IdentConn::ioParam_pvpatchAccumulateType ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

pvpatchAccumulateType: Specifies the method to accumulate synaptic input

Possible choices are

  • convolve: Accumulates through convolution
  • stochastic: Accumulates through stochastic release
  • maxpooling: Accumulates through max pooling
  • sumpooling: Accumulates through sum pooling

Defaults to convolve.

Reimplemented from PV::HyPerConn.

Definition at line 94 of file IdentConn.cpp.

void PV::RescaleConn::ioParam_scale ( enum ParamsIOFlag  ioFlag)
protected

scale: presynaptic activity is multiplied by this scale factor before being added to the postsynaptic input.

Definition at line 34 of file RescaleConn.cpp.

void PV::IdentConn::ioParam_selfFlag ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

selfFlag: Indicates if pre and post is the same layer.

The default value for selfFlag should be pre==post, but at the time ioParams(PARAMS_IO_READ) is called, pre and post have not been set. So we read the value with no warning if it's present; if it's absent, set the value to pre==post in the communicateInitInfo stage and issue the using-default-value warning then.

Reimplemented from PV::HyPerConn.

Definition at line 149 of file IdentConn.cpp.

void PV::HyPerConn::ioParam_triggerOffset ( enum ParamsIOFlag  ioFlag)
protectedvirtualinherited

triggerOffset: If trigger flag is set, triggers <triggerOffset> timesteps before target trigger

Defaults to 0.

Reimplemented in PV::PlasticCloneConn.

Definition at line 634 of file HyPerConn.cpp.

void PV::IdentConn::ioParam_weightInitType ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

weightInitType: Specifies the initialization method of weights

Possible choices are

Further parameters are needed depending on initialization type

Reimplemented from PV::HyPerConn.

Definition at line 71 of file IdentConn.cpp.

void PV::IdentConn::ioParam_writeCompressedCheckpoints ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

writeCompressedCheckpoints: Checkpoint weights are written compressed.

The parent HyPerCol must be writing checkpoints for this flag to be used

Reimplemented from PV::HyPerConn.

Definition at line 141 of file IdentConn.cpp.

void PV::IdentConn::ioParam_writeStep ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtualinherited

writeStep: Specifies the write period of the connection.

Defaults to every timestep. -1 to not write at all.

Reimplemented from PV::HyPerConn.

Definition at line 103 of file IdentConn.cpp.

int PV::BaseConnection::ioParams ( enum ParamsIOFlag  ioFlag)
inherited

Method for reading or writing the params from group in the parent HyPerCol's parameters. The group from params is selected using the name of the connection.

Note that ioParams is not virtual. To add parameters in a derived class, override ioParamFillGroup.

Definition at line 240 of file BaseConnection.cpp.

int PV::RescaleConn::ioParamsFillGroup ( enum ParamsIOFlag  ioFlag)
overrideprotectedvirtual

The virtual method for reading parameters from the parent HyPerCol's parameters, and writing to the output params file.

BaseConnection::ioParamsFillGroup reads/writes the paremeters preLayerName, postLayerName, channelCode, delay, numAxonalArbors, and convertRateToSpikeCount.

Derived classes with additional parameters typically override ioParamsFillGroup to call the base class's ioParamsFillGroup method and then call ioParam_[parametername] for each of their parameters. The ioParam_[parametername] methods should call the parent HyPerCol's ioParamValue() and related methods, to ensure that all parameters that get read also get written to the outputParams-generated file.

Reimplemented from PV::IdentConn.

Definition at line 28 of file RescaleConn.cpp.

bool PV::BaseObject::isUsingGPU ( ) const
inlineinherited

Returns true if the object requires the GPU; false otherwise. HyPerCol will not initialize the GPU unless one of the objects in its hierarchy returns true

Definition at line 79 of file BaseObject.hpp.

int PV::BaseConnection::maxDelaySteps ( )
protectedinherited

Returns the maximum value of the delay array, as a number of timesteps

Definition at line 577 of file BaseConnection.cpp.

float PV::HyPerConn::maxWeight ( int  arborId = 0)
virtualinherited

Actual maximum weight value

Reimplemented in PV::PoolingConn.

Definition at line 2199 of file HyPerConn.cpp.

float PV::HyPerConn::minWeight ( int  arborId = 0)
virtualinherited

Actual mininum weight value

Reimplemented in PV::PoolingConn.

Definition at line 2173 of file HyPerConn.cpp.

bool PV::HyPerConn::needUpdate ( double  time,
double  dt 
)
overridevirtualinherited

A pure virtual method whose implementation returns true if an the weights should update on the given timestep and false if not.

Implements PV::BaseConnection.

Reimplemented in PV::TransposePoolingConn, PV::privateTransposeConn, PV::TransposeConn, and PV::CopyConn.

Definition at line 2303 of file HyPerConn.cpp.

void PV::HyPerConn::normalize_dW ( )
protectedinherited

Normalizes dW for all arbors, by calling normalize_dW(int) for each arbor index.

Definition at line 2396 of file HyPerConn.cpp.

int PV::HyPerConn::normalize_dW ( int  arbor_ID)
protectedvirtualinherited

Normalizes dW for one arbor. HyPerConn normalizes dW by dividing by the number of activations.

Definition at line 2819 of file HyPerConn.cpp.

void PV::HyPerConn::openOutpuStateFile ( Checkpointer checkpointer)
protectedinherited

Called by registerData. If writeStep is nonnegative, opens the weights pvp file to be used by outputState, and registers its file position with the checkpointer.

int PV::HyPerConn::outputProbeParams ( )
overridevirtualinherited

Called by HyPerCol::outputParams to output the params groups for probes whose ownership has been transferred to this connection. (Does this need to be virtual?)

Reimplemented from PV::BaseConnection.

Definition at line 2268 of file HyPerConn.cpp.

int PV::HyPerConn::outputState ( double  timed)
overridevirtualinherited

A pure virtual function for writing the state of the connection to file(s) in the output directory. For example, HyPerConn writes the weights to a .pvp file with a schedule defined by writeStep and initialWriteTime.

Implements PV::BaseConnection.

Reimplemented in PV::CloneConn.

Definition at line 2279 of file HyPerConn.cpp.

int PV::HyPerConn::postSynapticPatchHead ( int  kPreEx,
int *  kxPostOut,
int *  kyPostOut,
int *  kfPostOut,
int *  dxOut,
int *  dyOut,
int *  nxpOut,
int *  nypOut 
)
inherited

Returns the head (kxPostOut, kyPostOut) of the post-synaptic patch plus other patch information. the pre-synaptic k index (extended units) address of the kx index in post layer (non-extended units) on output address of the ky index in post layer (non-extended units) on output address of the kf index in post layer (non-extended units) on output address of the change in x dimension size of patch (to fit border) on output address of the change in y dimension size of patch (to fit border) on output address of x dimension patch size (includes border reduction) on output address of y dimension patch size (includes border reduction) on output

NOTE: kxPostOut and kyPostOut are always within the post-synaptic non-extended layer because the patch size is reduced at borders

Definition at line 4337 of file HyPerConn.cpp.

int PV::HyPerConn::prepareCheckpointWrite ( )
overrideprotectedvirtualinherited

Calls blockingNormalize_dW.

Reimplemented from PV::CheckpointerDataInterface.

Definition at line 4940 of file HyPerConn.cpp.

int PV::HyPerConn::preSynapticPatchHead ( int  kxPost,
int  kyPost,
int  kfPost,
int *  kxPre,
int *  kyPre 
)
inherited

Returns the head (kxPre, kyPre) of a pre-synaptic patch given post-synaptic layer indices. the post-synaptic kx index (non-extended units) the post-synaptic ky index (non-extended units) the post-synaptic kf index address of the kx index in the pre-synaptic layer (non-extended units) on output address of the ky index in the pre-synaptic layer (non-extended units) on output

NOTE: kxPre and kyPre may be in the border region

Definition at line 4302 of file HyPerConn.cpp.

void PV::HyPerConn::reduce_dW ( )
protectedinherited

Reduces dW and activations for all arbors across MPI

Definition at line 2371 of file HyPerConn.cpp.

int PV::HyPerConn::reduce_dW ( int  arborId)
protectedvirtualinherited

Reduces dW and activations for one arbor across MPI

Definition at line 2504 of file HyPerConn.cpp.

void PV::HyPerConn::reduceAcrossBatch ( int  arborID)
protectedinherited

Used when batch size is greater than one, plasticityFlag is on, and shared weights are off. Sums the dW across all elements in the batch (both local and MPI).

Definition at line 2577 of file HyPerConn.cpp.

void PV::BaseConnection::setChannelType ( ChannelType  ch)
protectedinherited

Sets the channel to the indicated argument. It is an error to try to change channels after communicateInitInfo() has completed successfully.

Definition at line 91 of file BaseConnection.cpp.

void PV::BaseObject::setDataStructuresAllocatedFlag ( )
inlineprotectedinherited

This method sets mDataStructuresAllocatedFlag to true.

Definition at line 111 of file BaseObject.hpp.

void PV::BaseConnection::setDelay ( int  arborId,
double  delay 
)
protectedinherited

Sets the delay of the given arbor to the given amount. delay is specified in the same units that the parent HyPerCol's dt parameter is specified in. Internally, the delay is set as an integral number of timesteps, specifically round(delay/dt).

Definition at line 588 of file BaseConnection.cpp.

int PV::HyPerConn::setInitialValues ( )
overrideprotectedvirtualinherited

A pure virtual method for initializing the connection if we are neither restarting from a checkpoint or initializing the connection from a checkpoint. It should return PV_SUCCESS if successful, or PV_POSTPONE if it needs to wait for other objects to set their initial values before it can set its own initial values. (e.g. TransposeConn has to wait for original conn)

Implements PV::BaseConnection.

Reimplemented in PV::CopyConn, PV::PoolingConn, PV::TransposeConn, PV::TransposePoolingConn, and PV::privateTransposeConn.

Definition at line 2262 of file HyPerConn.cpp.

void PV::BaseObject::setInitialValuesSetFlag ( )
inlineprotectedinherited

This method sets the flag returned by getInitialValuesSetFlag to true.

Definition at line 116 of file BaseObject.hpp.

void PV::BaseObject::setInitInfoCommunicatedFlag ( )
inlineprotectedinherited

This method sets mInitInfoCommunicatedFlag to true.

Definition at line 106 of file BaseObject.hpp.

void PV::HyPerConn::setNeedPost ( )
inlineinherited

Sets the flag indicating that the postsynaptic perspective is needed.

Definition at line 327 of file HyPerConn.hpp.

void PV::BaseConnection::setNumberOfAxonalArborLists ( int  numArbors)
protectedinherited

Sets the number of arbors to the indicated argument. It is an error to try to change numArbors after communicateInitInfo() has completed successfully.

Definition at line 96 of file BaseConnection.cpp.

int PV::BaseConnection::setPreAndPostLayerNames ( )
protectedvirtualinherited

Sets the pre- and post-synaptic layer names according to the parent HyPerCol's params. Virtual to allow subclasses to infer layer names in other ways (for example, FeedbackConn flips pre- and post- layers from originalConn).

Reimplemented in PV::FeedbackConn.

Definition at line 52 of file BaseConnection.cpp.

int PV::HyPerConn::update_dW ( int  arborID)
protectedvirtualinherited

Updates the dW buffer

Reimplemented in PV::ImprintConn.

Definition at line 2599 of file HyPerConn.cpp.

void PV::HyPerConn::updateArbors ( )
protectedinherited

Updates the weights in all arbors, by calling updateWeights(int) for each arbor index.

Definition at line 2409 of file HyPerConn.cpp.

void PV::HyPerConn::updateLocal_dW ( )
protectedinherited

updateLocal_dW computes the contribution of the current process to dW, before MPI reduction and normalization. The routine calls initialize_dW for each arbor, and then updateWeights for each arbor.

Definition at line 2350 of file HyPerConn.cpp.

int PV::HyPerConn::updateState ( double  timed,
double  dt 
)
overridevirtualinherited

A pure virtual function for updating the state of the connection. timed is simulation time, and dt is the time increment between steps.

Implements PV::BaseConnection.

Reimplemented in PV::TransposePoolingConn, PV::privateTransposeConn, PV::TransposeConn, PV::CloneConn, and PV::CopyConn.

Definition at line 2313 of file HyPerConn.cpp.

virtual int PV::IdentConn::updateWeights ( int  arborId)
inlineoverridevirtualinherited

Updates the weights in one arbor. HyPerConn updates the weights using W_new = W_old + dW.

Reimplemented from PV::HyPerConn.

Definition at line 24 of file IdentConn.hpp.


The documentation for this class was generated from the following files: