#include <CutBelowThresholdVariable.h>
Inheritance diagram for PLearn::CutBelowThresholdVariable:
Public Member Functions | |
CutBelowThresholdVariable () | |
Default constructor for persistence. | |
CutBelowThresholdVariable (Variable *input, real the_threshold) | |
PLEARN_DECLARE_OBJECT (CutBelowThresholdVariable) | |
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 | |
real | threshold |
Private Types | |
typedef UnaryVariable | inherited |
|
Reimplemented from PLearn::UnaryVariable. Definition at line 54 of file CutBelowThresholdVariable.h. Referenced by CutBelowThresholdVariable(). |
|
Default constructor for persistence.
Definition at line 61 of file CutBelowThresholdVariable.h. References threshold. |
|
Definition at line 57 of file CutBelowThresholdVariable.cc. References inherited. |
|
Implements PLearn::Variable. Definition at line 88 of file CutBelowThresholdVariable.cc. References PLearn::Variable::nelems(), and threshold. |
|
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::UnaryVariable. Definition at line 72 of file CutBelowThresholdVariable.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
compute output given input
Implements PLearn::Variable. Definition at line 78 of file CutBelowThresholdVariable.cc. References PLearn::Variable::nelems(), threshold, and val. |
|
|
|
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 62 of file CutBelowThresholdVariable.cc. References PLearn::Var::length(), and PLearn::Var::width(). |
|
compute a piece of new Var graph that represents the symbolic derivative of this Var
Reimplemented from PLearn::Variable. Definition at line 96 of file CutBelowThresholdVariable.cc. References threshold. |
|
Definition at line 57 of file CutBelowThresholdVariable.h. Referenced by bprop(), CutBelowThresholdVariable(), fprop(), and symbolicBprop(). |