CvGenericPlane Class Reference

The class provides a generic interface that every plane (neuron) must implement. More...

#include <cvgenericplane.h>

Inheritance diagram for CvGenericPlane:

Inheritance graph
[legend]
Collaboration diagram for CvGenericPlane:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CvGenericPlane (std::string id, CvSize fmapsz, CvSize neurosz)
 Constructor.
virtual ~CvGenericPlane ()
 Destructor.
int connto (std::vector< CvGenericPlane * > &pplane)
 Connect the plane to the parent planes.
int connchild (CvGenericPlane *cplane)
 Connect the plane back to child.
int disconn ()
 Disconnect the plane completely.
virtual CvMat * fprop ()=0
 Do forward propagation.
virtual std::string toString ()=0
 Produce string representation.
virtual int setweight (std::vector< double > &weights)
 Explicitly set the weights for the plane's neuron.
CvMat * getfmap ()
 Get a pointer to plane's feature map.
int setfmap (CvArr *source)
 Explicitly set values for plane's feature map.
std::string getid ()
 Get plane's text id.

Protected Attributes

std::string m_id
 Plane string id.
std::vector< CvGenericPlane * > m_pplane
 Links to parents (for fprop).
std::vector< CvGenericPlane * > m_cplane
 Links to childs (for bprop).
std::vector< CvMat * > m_pfmap
 Cached pointers to parents feature maps (for fprop).
std::vector< double > m_delta
 Deltas (will be used for bprop).
CvMat * m_fmap
 Container of feature map for this plane.
CvSize m_fmapsz
 Size of feature map.
CvSize m_neurosz
 Neuron window.
std::vector< double > m_weight
 Container for weights of plane's neuron.
int m_connected
 Flag specifying whether we are already connected to parents or not.

Detailed Description

The class provides a generic interface that every plane (neuron) must implement.

The class provides a generic interface that every plane must implement, it also provides basic functionality that is used by every type of the plane

Each plane object represents one neuron (not a layer!). The object also contains weights for this neuron and feature map for this neuron.

Definition at line 56 of file cvgenericplane.h.


Constructor & Destructor Documentation

CvGenericPlane::CvGenericPlane ( std::string  id,
CvSize  fmapsz,
CvSize  neurosz 
)

Constructor.

Base class constructor creates a new generic plane with specified name, specified size of feature map and specified size of "neuron window"

Parameters:
id name of the plane
fmapsz size of the featuremap for this plane
neurosz size of "neuron window" (for instance 5x5 means that we have a neuron that is connected to 25 outputs of his predecessor neuron feature map)

Definition at line 57 of file cvgenericplane.cpp.

References m_connected, m_fmap, m_fmapsz, m_id, m_neurosz, m_pplane, and m_weight.

CvGenericPlane::~CvGenericPlane (  )  [virtual]

Destructor.

Definition at line 82 of file cvgenericplane.cpp.

References m_fmap.


Member Function Documentation

int CvGenericPlane::connto ( std::vector< CvGenericPlane * > &  pplane  ) 

Connect the plane to the parent planes.

The method connects the plane to the given parent planes It also notifies each parent plane that this plane is their child plane (will be used for bprop)

Parameters:
pplane parent planes
Returns:
status

Definition at line 98 of file cvgenericplane.cpp.

References getfmap(), m_connected, m_pfmap, and m_pplane.

int CvGenericPlane::connchild ( CvGenericPlane cplane  ) 

Connect the plane back to child.

The method connects the plane to its child. It is used only by connto() method in order to notify a parent that it is being connected by a child. After all connto() are done, each plane will have a list of parents as well as list of its childs.

Definition at line 123 of file cvgenericplane.cpp.

References m_cplane.

int CvGenericPlane::disconn (  ) 

Disconnect the plane completely.

The method disconnects the plane from all planes

Returns:
status

Definition at line 134 of file cvgenericplane.cpp.

References m_connected, m_cplane, m_pfmap, and m_pplane.

virtual CvMat* CvGenericPlane::fprop (  )  [pure virtual]

Do forward propagation.

Implemented in CvConvolutionPlane, CvMaxPlane, CvRBFPlane, CvSourcePlane, and CvSubSamplingPlane.

virtual std::string CvGenericPlane::toString (  )  [pure virtual]

Produce string representation.

Implemented in CvConvolutionPlane, CvMaxPlane, CvRBFPlane, CvSourcePlane, and CvSubSamplingPlane.

int CvGenericPlane::setweight ( std::vector< double > &  weights  )  [virtual]

Explicitly set the weights for the plane's neuron.

The method explicitly sets the weights of the neuron

Reimplemented in CvConvolutionPlane, CvMaxPlane, CvRBFPlane, and CvSubSamplingPlane.

Definition at line 175 of file cvgenericplane.cpp.

References m_connected, and m_weight.

Referenced by CvSubSamplingPlane::setweight(), CvRBFPlane::setweight(), and CvConvolutionPlane::setweight().

CvMat * CvGenericPlane::getfmap (  ) 

Get a pointer to plane's feature map.

Returns:
pointer to feature map of the plane

Definition at line 168 of file cvgenericplane.cpp.

References m_fmap.

Referenced by connto().

int CvGenericPlane::setfmap ( CvArr *  source  ) 

Explicitly set values for plane's feature map.

The method explicitly sets the values of plane's feature map. It just copies feature map given in the input parameter to the plane's own storage.

Parameters:
source feature map to be copied from (CvMat or IplImage)
Returns:
status

Definition at line 150 of file cvgenericplane.cpp.

References m_fmap.

string CvGenericPlane::getid (  ) 

Get plane's text id.

Returns:
string id of the plane

Definition at line 187 of file cvgenericplane.cpp.

References m_id.

Referenced by CvRBFPlane::toString(), CvMaxPlane::toString(), and CvConvolutionPlane::toString().


Member Data Documentation

std::string CvGenericPlane::m_id [protected]

Plane string id.

Definition at line 99 of file cvgenericplane.h.

Referenced by CvGenericPlane(), getid(), CvSubSamplingPlane::toString(), CvSourcePlane::toString(), CvRBFPlane::toString(), CvMaxPlane::toString(), and CvConvolutionPlane::toString().

std::vector<CvGenericPlane *> CvGenericPlane::m_pplane [protected]

Links to parents (for fprop).

Definition at line 100 of file cvgenericplane.h.

Referenced by connto(), CvGenericPlane(), disconn(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvMaxPlane::fprop(), CvConvolutionPlane::fprop(), CvRBFPlane::setweight(), CvConvolutionPlane::setweight(), CvSubSamplingPlane::toString(), CvRBFPlane::toString(), CvMaxPlane::toString(), and CvConvolutionPlane::toString().

std::vector<CvGenericPlane *> CvGenericPlane::m_cplane [protected]

Links to childs (for bprop).

Definition at line 101 of file cvgenericplane.h.

Referenced by connchild(), and disconn().

std::vector<CvMat *> CvGenericPlane::m_pfmap [protected]

Cached pointers to parents feature maps (for fprop).

Definition at line 102 of file cvgenericplane.h.

Referenced by connto(), disconn(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvMaxPlane::fprop(), and CvConvolutionPlane::fprop().

std::vector<double> CvGenericPlane::m_delta [protected]

Deltas (will be used for bprop).

Definition at line 103 of file cvgenericplane.h.

CvMat* CvGenericPlane::m_fmap [protected]

Container of feature map for this plane.

Definition at line 105 of file cvgenericplane.h.

Referenced by CvGenericPlane(), CvSubSamplingPlane::fprop(), CvSourcePlane::fprop(), CvRBFPlane::fprop(), CvMaxPlane::fprop(), CvConvolutionPlane::fprop(), getfmap(), setfmap(), and ~CvGenericPlane().

CvSize CvGenericPlane::m_fmapsz [protected]

Size of feature map.

Definition at line 106 of file cvgenericplane.h.

Referenced by CvGenericPlane(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvConvolutionPlane::fprop(), CvSubSamplingPlane::toString(), CvSourcePlane::toString(), CvRBFPlane::toString(), and CvConvolutionPlane::toString().

CvSize CvGenericPlane::m_neurosz [protected]

Neuron window.

Definition at line 107 of file cvgenericplane.h.

Referenced by CvGenericPlane(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvConvolutionPlane::fprop(), CvRBFPlane::setweight(), CvConvolutionPlane::setweight(), CvSubSamplingPlane::toString(), CvRBFPlane::toString(), and CvConvolutionPlane::toString().

std::vector<double> CvGenericPlane::m_weight [protected]

Container for weights of plane's neuron.

Definition at line 109 of file cvgenericplane.h.

Referenced by CvConvolutionPlane::CvConvolutionPlane(), CvGenericPlane(), CvMaxPlane::CvMaxPlane(), CvRBFPlane::CvRBFPlane(), CvSubSamplingPlane::CvSubSamplingPlane(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvConvolutionPlane::fprop(), setweight(), CvSubSamplingPlane::toString(), CvRBFPlane::toString(), and CvConvolutionPlane::toString().

int CvGenericPlane::m_connected [protected]

Flag specifying whether we are already connected to parents or not.

Definition at line 110 of file cvgenericplane.h.

Referenced by connto(), CvGenericPlane(), disconn(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvMaxPlane::fprop(), CvConvolutionPlane::fprop(), and setweight().


The documentation for this class was generated from the following files:
Generated on Fri Aug 3 16:17:33 2007 for ConvNet by  doxygen 1.5.0