#include <ExtendedVariable.h>
Inheritance diagram for PLearn::ExtendedVariable:
Public Member Functions | |
ExtendedVariable () | |
Default constructor for persistence. | |
ExtendedVariable (Variable *input, int the_top_extent, int the_bottom_extent, int the_left_extent, int the_right_extent, real the_fill_value) | |
PLEARN_DECLARE_OBJECT (ExtendedVariable) | |
virtual void | build () |
Should call simply inherited::build(), then this class's build_(). | |
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 | |
virtual void | rfprop () |
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) | |
Public Attributes | |
int | top_extent |
int | bottom_extent |
int | left_extent |
int | right_extent |
real | fill_value |
Protected Member Functions | |
void | build_ () |
Private Types | |
typedef UnaryVariable | inherited |
Definition at line 61 of file ExtendedVariable.h.
|
Reimplemented from PLearn::UnaryVariable. Definition at line 63 of file ExtendedVariable.h. Referenced by ExtendedVariable(). |
|
Default constructor for persistence.
Definition at line 74 of file ExtendedVariable.h. References bottom_extent, fill_value, left_extent, right_extent, and top_extent. |
|
Definition at line 58 of file ExtendedVariable.cc. |
|
Implements PLearn::Variable. Definition at line 126 of file ExtendedVariable.cc. References k, left_extent, PLearn::Var::length(), top_extent, PLearn::Var::width(), and PLearn::Variable::width(). |
|
Should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object. Reimplemented from PLearn::Variable. Definition at line 69 of file ExtendedVariable.cc. References build_(). |
|
This method should be redefined in subclasses and do the actual building of the object according to previously set option fields. Constructors can just set option fields, and then call build_. This method is NOT virtual, and will typically be called only from three places: a constructor, the public virtual build() method, and possibly the public virtual read method (which calls its parent's read). build_() can assume that it's parent's build_ has already been called. Reimplemented from PLearn::Variable. Definition at line 76 of file ExtendedVariable.cc. References bottom_extent, fill_value, k, left_extent, PLearn::Variable::nelems(), PLERROR, right_extent, and top_extent. Referenced by build(), and ExtendedVariable(). |
|
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 85 of file ExtendedVariable.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
compute output given input
Implements PLearn::Variable. Definition at line 104 of file ExtendedVariable.cc. References k, left_extent, PLearn::Var::length(), top_extent, PLearn::Var::width(), and PLearn::Variable::width(). |
|
|
|
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 95 of file ExtendedVariable.cc. References bottom_extent, left_extent, PLearn::Var::length(), right_extent, top_extent, and PLearn::Var::width(). |
|
Reimplemented from PLearn::Variable. Definition at line 154 of file ExtendedVariable.cc. References k, left_extent, PLearn::Var::length(), PLearn::TVec< T >::length(), PLearn::UnaryVariable::resizeRValue(), top_extent, PLearn::Var::width(), and PLearn::Variable::width(). |
|
compute a piece of new Var graph that represents the symbolic derivative of this Var
Reimplemented from PLearn::Variable. Definition at line 148 of file ExtendedVariable.cc. References left_extent, PLearn::Var::length(), top_extent, and PLearn::Var::width(). |
|
Definition at line 67 of file ExtendedVariable.h. Referenced by build_(), ExtendedVariable(), and recomputeSize(). |
|
Definition at line 70 of file ExtendedVariable.h. Referenced by build_(), and ExtendedVariable(). |
|
Definition at line 68 of file ExtendedVariable.h. Referenced by bprop(), build_(), ExtendedVariable(), fprop(), recomputeSize(), rfprop(), and symbolicBprop(). |
|
Definition at line 69 of file ExtendedVariable.h. Referenced by build_(), ExtendedVariable(), and recomputeSize(). |
|
Definition at line 66 of file ExtendedVariable.h. Referenced by bprop(), build_(), ExtendedVariable(), fprop(), recomputeSize(), rfprop(), and symbolicBprop(). |