PetaVision  Alpha
PV::InitUniformRandomWeights Class Reference
Inheritance diagram for PV::InitUniformRandomWeights:
PV::InitRandomWeights PV::InitWeights PV::BaseObject PV::CheckpointerDataInterface PV::Observer

InitWeights Parameters

List of parameters needed by InitWeights class

virtual void ioParam_initWeightsFile (enum ParamsIOFlag ioFlag)
 initWeightsFile: A path to a weight pvp file to use for initializing the weights, which overrides the usual method of initializing weights defined by the class being instantiated. If the weights file has fewer features than the connection being initialized, the weights file is used for the lower-indexed features and the calcWeights method is used for the rest. If null or empty, calcWeights() is used to initialize all the weights.
virtual void ioParam_useListOfArborFiles (enum ParamsIOFlag ioFlag)
 useListOfArborFiles: A flag that indicates whether the initWeightsFile contains a single weight pvp file, or a list of files to be used for several arbors. The files inthe list can themselves have multiple arbors; each file isloaded in turn until the number of arbors in the connection is reached.
virtual void ioParam_combineWeightFiles (enum ParamsIOFlag ioFlag)
 combineWeightFiles: A flag that indicates whether the initWeightsFile is a list of weight files that should be combined.
virtual void ioParam_numWeightFiles (enum ParamsIOFlag ioFlag)
 numWeightFiles: If combineWeightFiles is set, specifies the number of weight files in the list of files specified by initWeightsFile.

Public Member Functions

 InitUniformRandomWeights (char const *name, HyPerCol *hc)
bool getDataStructuresAllocatedFlag ()
std::string const & getDescription () const
char const * getDescription_c () const
bool getInitialValuesSetFlag ()
bool getInitInfoCommunicatedFlag ()
char const * getKeyword () const
MPIBlock const * getMPIBlock ()
char const * getName () const
int initializeWeights (PVPatch ***patches, float **dataStart, double *timef=NULL)
virtual int ioParamsFillGroup (enum ParamsIOFlag ioFlag) override
bool isUsingGPU () const
virtual int registerData (Checkpointer *checkpointer)
virtual int respond (std::shared_ptr< BaseMessage const > message) override

Protected Member Functions

virtual int allocateDataStructures ()
float calcDelta (int post, float dPost, float distHeadPreUnits)
virtual void calcWeights (float *dataStart, int patchIndex, int arborId) override
virtual void calcWeights ()
float calcXDelta (int iPost)
float calcYDelta (int jPost)
virtual int cleanup ()
virtual int communicateInitInfo (CommunicateInitInfoMessage const *message) override
virtual int copyInitialStateToGPU ()
int initialize (char const *name, HyPerCol *hc)
virtual int initializeState ()
virtual int initRNGs (bool isKernel) override
void ioParam_minNNZ (enum ParamsIOFlag ioFlag)
void ioParam_sparseFraction (enum ParamsIOFlag ioFlag)
void ioParam_wMaxInit (enum ParamsIOFlag ioFlag)
void ioParam_wMinInit (enum ParamsIOFlag ioFlag)
int kernelIndexCalculations (int patchIndex)
virtual int prepareCheckpointWrite ()
virtual int processCheckpointRead ()
void randomWeights (float *patchDataStart, int patchIndex) override
void readCombinedWeightFiles (bool sharedWeights, float **dataStart, int numPatchesX, int numPatchesY, int numPatchesF, const char *fileOfWeightFiles, double *timestampPtr=nullptr)
void readListOfArborFiles (bool sharedWeights, float **dataStart, int numPatchesX, int numPatchesY, int numPatchesF, const char *listOfArborsFilename, double *timestampPtr=nullptr)
virtual int readStateFromCheckpoint (Checkpointer *checkpointer) override
void readWeightPvpFile (bool sharedWeights, float **dataStart, int numPatchesX, int numPatchesY, int numPatchesF, const char *weightPvpFile, int numArbors, double *timestampPtr=nullptr)
virtual int readWeights (bool sharedWeights, float **dataStart, int numPatchesX, int numPatchesY, int numPatchesF, const char *filename, double *timestampPtr=nullptr)
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 setDataStructuresAllocatedFlag ()
virtual int setDescription () override
void setInitialValuesSetFlag ()
void setInitInfoCommunicatedFlag ()
int setName (char const *name)
int setParent (HyPerCol *hc)
virtual int zeroWeightsOutsideShrunkenPatch (PVPatch ***patches)

Protected Attributes

std::string description
HyPerConnmCallingConn = nullptr
bool mCombineWeightFiles = false
bool mDataStructuresAllocatedFlag = false
float mDxPost
float mDyPost
char * mFilename = nullptr
bool mInitialValuesSetFlag = false
bool mInitInfoCommunicatedFlag = false
int mMinNNZ = 0
int mNumWeightFiles = 1
HyPerLayermPostLayer = nullptr
HyPerLayermPreLayer = nullptr
float mSparseFraction = 0
bool mUseListOfArborFiles = false
bool mUsingGPUFlag = false
float mWMax = 1
float mWMin = 0
float mXDistHeadPreUnits
float mYDistHeadPreUnits
char * name = nullptr
HyPerColparent = nullptr

Private Member Functions

int initialize_base ()

Detailed Description

Definition at line 15 of file InitUniformRandomWeights.hpp.

Member Function Documentation

bool PV::BaseObject::getDataStructuresAllocatedFlag ( )

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.

bool PV::BaseObject::getInitialValuesSetFlag ( )

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 ( )

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.

bool PV::BaseObject::isUsingGPU ( ) const

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.

void PV::InitUniformRandomWeights::randomWeights ( float *  patchDataStart,
int  patchIndex 

randomWeights() fills the full-size patch with random numbers, whether or not the patch is shrunken.

Implements PV::InitRandomWeights.

Definition at line 58 of file InitUniformRandomWeights.cpp.

void PV::BaseObject::setDataStructuresAllocatedFlag ( )

This method sets mDataStructuresAllocatedFlag to true.

Definition at line 111 of file BaseObject.hpp.

void PV::BaseObject::setInitialValuesSetFlag ( )

This method sets the flag returned by getInitialValuesSetFlag to true.

Definition at line 116 of file BaseObject.hpp.

void PV::BaseObject::setInitInfoCommunicatedFlag ( )

This method sets mInitInfoCommunicatedFlag to true.

Definition at line 106 of file BaseObject.hpp.

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