Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::SoftSlopeVariable Class Reference

#include <SoftSlopeVariable.h>

Inheritance diagram for PLearn::SoftSlopeVariable:

Inheritance graph
[legend]
Collaboration diagram for PLearn::SoftSlopeVariable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SoftSlopeVariable ()
 Default constructor for persistence.

 SoftSlopeVariable (Variable *x, Variable *smoothness, Variable *left, Variable *right, bool tabulated=true)
 PLEARN_DECLARE_OBJECT (SoftSlopeVariable)
virtual void recomputeSize (int &l, int &w) const
 Recomputes the length l and width w that this variable should have, according to its parent variables.

virtual void fprop ()
 compute output given input

virtual void bprop ()
virtual void symbolicBprop ()
 compute a piece of new Var graph that represents the symbolic derivative of this Var


Static Public Member Functions

void declareOptions (OptionList &ol)
 redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)


Protected Attributes

bool tabulated

Private Types

typedef NaryVariable inherited

Member Typedef Documentation

typedef NaryVariable PLearn::SoftSlopeVariable::inherited [private]
 

Reimplemented from PLearn::NaryVariable.

Definition at line 60 of file SoftSlopeVariable.h.

Referenced by SoftSlopeVariable().


Constructor & Destructor Documentation

PLearn::SoftSlopeVariable::SoftSlopeVariable  )  [inline]
 

Default constructor for persistence.

Definition at line 67 of file SoftSlopeVariable.h.

PLearn::SoftSlopeVariable::SoftSlopeVariable Variable x,
Variable smoothness,
Variable left,
Variable right,
bool  tabulated = true
 

Definition at line 61 of file SoftSlopeVariable.cc.

References inherited, PLearn::left(), PLearn::right(), and x.


Member Function Documentation

void PLearn::SoftSlopeVariable::bprop  )  [virtual]
 

Implements PLearn::Variable.

Definition at line 125 of file SoftSlopeVariable.cc.

References PLearn::left(), PLearn::VarArray::nelems(), PLearn::Variable::nelems(), PLearn::right(), PLearn::sigmoid(), PLearn::soft_slope(), tabulated, PLearn::tabulated_soft_slope(), and x.

void PLearn::SoftSlopeVariable::declareOptions OptionList ol  )  [static]
 

redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)

ex: static void declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "the size of the input\n it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "the learnt model weights"); inherited::declareOptions(ol); }

Reimplemented from PLearn::NaryVariable.

Definition at line 68 of file SoftSlopeVariable.cc.

References PLearn::declareOption(), and PLearn::OptionList.

void PLearn::SoftSlopeVariable::fprop  )  [virtual]
 

compute output given input

Implements PLearn::Variable.

Definition at line 95 of file SoftSlopeVariable.cc.

References PLearn::left(), PLearn::VarArray::nelems(), PLearn::Variable::nelems(), PLearn::right(), PLearn::soft_slope(), tabulated, PLearn::tabulated_soft_slope(), and x.

PLearn::SoftSlopeVariable::PLEARN_DECLARE_OBJECT SoftSlopeVariable   ) 
 

void PLearn::SoftSlopeVariable::recomputeSize int l,
int w
const [virtual]
 

Recomputes the length l and width w that this variable should have, according to its parent variables.

This is used for ex. by sizeprop() The default version stupidly returns the current dimensions, so make sure to overload it in subclasses if this is not appropriate.

Reimplemented from PLearn::Variable.

Definition at line 74 of file SoftSlopeVariable.cc.

References PLERROR, and PLearn::TVec< Var >::size().

void PLearn::SoftSlopeVariable::symbolicBprop  )  [virtual]
 

compute a piece of new Var graph that represents the symbolic derivative of this Var

Reimplemented from PLearn::Variable.

Definition at line 164 of file SoftSlopeVariable.cc.

References PLERROR.


Member Data Documentation

bool PLearn::SoftSlopeVariable::tabulated [protected]
 

Definition at line 63 of file SoftSlopeVariable.h.

Referenced by bprop(), and fprop().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:25:38 2004 for PLearn by doxygen 1.3.7