PetaVision  Alpha
 All Data Structures Namespaces Functions Variables
PV::NormalizeMax Class Reference
Inheritance diagram for PV::NormalizeMax:
PV::NormalizeMultiply PV::NormalizeBase PV::BaseObject

Public Member Functions

 NormalizeMax (const char *name, HyPerCol *hc)
 
int addConnToList (HyPerConn *newConn)
 
char const * getKeyword () const
 
const char * getName ()
 
char const * getName () const
 
const bool getNormalizeArborsIndividuallyFlag ()
 
const float getNormalizeCutoff ()
 
const bool getNormalizeFromPostPerspectiveFlag ()
 
HyPerColgetParent () const
 
const float getRMinX ()
 
const float getRMinY ()
 
const float getStrength ()
 
virtual void ioParam_nonnegativeConstraintFlag (enum ParamsIOFlag ioFlag)
 
virtual void ioParam_normalize_cutoff (enum ParamsIOFlag ioFlag)
 
virtual void ioParam_normalizeFromPostPerspective (enum ParamsIOFlag ioFlag)
 
virtual void ioParam_rMinX (enum ParamsIOFlag ioFlag)
 
virtual void ioParam_rMinY (enum ParamsIOFlag ioFlag)
 
virtual int ioParamsFillGroup (enum ParamsIOFlag ioFlag)
 
virtual int normalizeWeights ()
 
int normalizeWeightsWrapper ()
 

Protected Member Functions

int accumulateMax (pvwdata_t *dataPatchStart, int weights_in_patch, float *max)
 
int accumulateMaxAbs (pvwdata_t *dataPatchStart, int weights_in_patch, float *max)
 
int accumulateMin (pvwdata_t *dataPatchStart, int weights_in_patch, float *max)
 
int accumulateSum (pvwdata_t *dataPatchStart, int weights_in_patch, double *sum)
 
int accumulateSumShrunken (pvwdata_t *dataPatchStart, double *sum, int nxpShrunken, int nypShrunken, int offsetShrunken, int xPatchStride, int yPatchStride)
 
int accumulateSumSquared (pvwdata_t *dataPatchStart, int weights_in_patch, double *sumsq)
 
int accumulateSumSquaredShrunken (pvwdata_t *dataPatchStart, double *sumsq, int nxpShrunken, int nypShrunken, int offsetShrunken, int xPatchStride, int yPatchStride)
 
int applyRMin (pvwdata_t *dataPatchStart, float rMinX, float rMinY, int nxp, int nyp, int xPatchStride, int yPatchStride)
 
int applyThreshold (pvwdata_t *dataPatchStart, int weights_in_patch, float wMax)
 
int initialize (const char *name, HyPerCol *hc)
 
virtual void ioParam_minMaxTolerated (enum ParamsIOFlag ioFlag)
 
virtual void ioParam_normalizeArborsIndividually (enum ParamsIOFlag ioFlag)
 
virtual void ioParam_normalizeOnInitialize (enum ParamsIOFlag ioFlag)
 
virtual void ioParam_normalizeOnWeightUpdate (enum ParamsIOFlag ioFlag)
 
virtual void ioParam_strength (enum ParamsIOFlag ioFlag)
 
int setName (char const *name)
 
int setParent (HyPerCol *hc)
 

Static Protected Member Functions

static void normalizePatch (pvwdata_t *dataStart, int weights_per_patch, float multiplier)
 

Protected Attributes

HyPerConn ** connectionList
 
float minMaxTolerated
 
char * name
 
bool nonnegativeConstraintFlag
 
float normalize_cutoff
 
bool normalizeArborsIndividually
 
bool normalizeFromPostPerspective
 
bool normalizeOnInitialize
 
bool normalizeOnWeightUpdate
 
int numConnections
 
HyPerColparent
 
float rMinX
 
float rMinY
 
float strength
 

Private Member Functions

int initialize_base ()
 

Detailed Description

Definition at line 15 of file NormalizeMax.hpp.

Member Function Documentation

int PV::NormalizeBase::addConnToList ( HyPerConn newConn)
inherited

Appends the indicated connection to the list of connections for this normalizer

Definition at line 187 of file NormalizeBase.cpp.

int PV::NormalizeMultiply::applyRMin ( pvwdata_t *  dataPatchStart,
float  rMinX,
float  rMinY,
int  nxp,
int  nyp,
int  xPatchStride,
int  yPatchStride 
)
protectedinherited

Zeroes out all weights in a rectangle defined by the member variables rMinX, rMinY. dataPatchStart is a pointer to a patch. nxp and nyp are the dimensions of the patch xPatchStride, yPatchStride are the strides in the x- and y-directions. nfp is implicitly the same as xPatchStride rMinX and rMinY are the half-width and half-height of the rectangle to be zeroed out. The rectangle to be zeroed out is centered at the center of the patch. Pixels in the interior of the rectangle are set to zero, but pixels exactly on the edge of the rectangle are not changed.

Definition at line 193 of file NormalizeMultiply.cpp.

int PV::NormalizeMultiply::applyThreshold ( pvwdata_t *  dataPatchStart,
int  weights_in_patch,
float  wMax 
)
protectedinherited

Sets all weights in a patch whose absolute value is below a certain value, to zero dataPatchStart is a pointer to a buffer of weights weights_in_patch is the number of weights in the dataPatchStart buffer wMax defines the threshold. If |w| < wMax * normalize_cutoff, the weight will be zeroed.

Definition at line 180 of file NormalizeMultiply.cpp.

void PV::NormalizeMultiply::ioParam_nonnegativeConstraintFlag ( enum ParamsIOFlag  ioFlag)
virtualinherited

If set to true, negative weights are replaced by zero

Definition at line 53 of file NormalizeMultiply.cpp.

void PV::NormalizeMultiply::ioParam_normalize_cutoff ( enum ParamsIOFlag  ioFlag)
virtualinherited

If positive, all weights whose absolute value is less than (normalize_cutoff * (max weight over all patches and all arbors)) are set to zero. The maximum weight is calculated after applying the behavior defined by rMinX, rMinY and nonnegativeConstraintFlag.

Definition at line 57 of file NormalizeMultiply.cpp.

void PV::NormalizeMultiply::ioParam_normalizeFromPostPerspective ( enum ParamsIOFlag  ioFlag)
virtualinherited

If set to true, the weights are accumulated based on the index of the post-synaptic neuron. If false, the index of the pre-synaptic neuron is used.

Reimplemented in PV::NormalizeGap.

Definition at line 61 of file NormalizeMultiply.cpp.

void PV::NormalizeMultiply::ioParam_rMinX ( enum ParamsIOFlag  ioFlag)
virtualinherited

Sets the size in the x-direction of the rectangle zeroed out by applyRMin

Definition at line 45 of file NormalizeMultiply.cpp.

void PV::NormalizeMultiply::ioParam_rMinY ( enum ParamsIOFlag  ioFlag)
virtualinherited

Sets the size in the y-direction of the rectangle zeroed out by applyRMin

Definition at line 49 of file NormalizeMultiply.cpp.

int PV::NormalizeBase::normalizeWeightsWrapper ( )
inherited

The public interface for normalizing weights. If normalizeOnInitialize is true and the simulation time is startTime(), or if normalizeOnWeightUpdate is true and the simulation time is the conn's lastUpdateTime, it calls the (virtual protected) method normalizeWeights

Definition at line 76 of file NormalizeBase.cpp.


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