#include <SoftSlopeVariable.h>
Inheritance diagram for PLearn::SoftSlopeVariable:
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 |
|
Reimplemented from PLearn::NaryVariable. Definition at line 60 of file SoftSlopeVariable.h. Referenced by SoftSlopeVariable(). |
|
Default constructor for persistence.
Definition at line 67 of file SoftSlopeVariable.h. |
|
Definition at line 61 of file SoftSlopeVariable.cc. References inherited, PLearn::left(), PLearn::right(), and x. |
|
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. |
|
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. |
|
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. |
|
|
|
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(). |
|
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. |
|
Definition at line 63 of file SoftSlopeVariable.h. |