#include <UnfoldedFuncVariable.h>
Inheritance diagram for PLearn::UnfoldedFuncVariable:
Public Member Functions | |
UnfoldedFuncVariable () | |
protected default constructor for persistence | |
UnfoldedFuncVariable (Var inputmatrix, Func the_f, bool transpose) | |
concatenate_{i=0 to n_unfold} f(i-th row of input_matrix) | |
PLEARN_DECLARE_OBJECT (UnfoldedFuncVariable) | |
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 | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
virtual void | fprop () |
compute output given input | |
virtual void | bprop () |
void | printInfo (bool print_gradient) |
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 | |
Var | input_matrix |
Func | f |
bool | transpose |
TVec< VarArray > | inputs |
TVec< Var > | outputs |
TVec< VarArray > | f_paths |
Protected Member Functions | |
void | build_ () |
Private Types | |
typedef NaryVariable | inherited |
|
Reimplemented from PLearn::NaryVariable. Definition at line 54 of file UnfoldedFuncVariable.h. Referenced by UnfoldedFuncVariable(). |
|
protected default constructor for persistence
Definition at line 60 of file UnfoldedFuncVariable.cc. References PLearn::transpose(). |
|
concatenate_{i=0 to n_unfold} f(i-th row of input_matrix)
Definition at line 64 of file UnfoldedFuncVariable.cc. References build(), inherited, PLearn::nonInputParentsOfPath(), and PLearn::transpose(). |
|
Implements PLearn::Variable. Definition at line 165 of file UnfoldedFuncVariable.cc. References PLearn::TMat< T >::column(), f_paths, input_matrix, PLearn::Var::length(), outputs, transpose, and PLearn::Var::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 75 of file UnfoldedFuncVariable.cc. References build_(). Referenced by UnfoldedFuncVariable(). |
|
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 81 of file UnfoldedFuncVariable.cc. References f, f_paths, input_matrix, inputs, PLearn::Var::length(), outputs, PLERROR, PLearn::propagationPath(), PLearn::TVec< Var >::resize(), PLearn::TVec< VarArray >::resize(), transpose, and PLearn::Var::width(). Referenced by build(). |
|
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 103 of file UnfoldedFuncVariable.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
compute output given input
Implements PLearn::Variable. Definition at line 145 of file UnfoldedFuncVariable.cc. References PLearn::TMat< T >::column(), PLearn::Var::column(), f_paths, input_matrix, inputs, PLearn::Var::length(), outputs, transpose, PLearn::Vec, and PLearn::Var::width(). |
|
Reimplemented from PLearn::NaryVariable. Definition at line 134 of file UnfoldedFuncVariable.cc. References PLearn::deepCopyField(), f, f_paths, input_matrix, inputs, and outputs. |
|
|
|
Reimplemented from PLearn::NaryVariable. Definition at line 182 of file UnfoldedFuncVariable.cc. References PLearn::endl(), f_paths, PLearn::Variable::getName(), PLearn::Object::info(), input_matrix, PLearn::Var::length(), outputs, transpose, and PLearn::Var::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 119 of file UnfoldedFuncVariable.cc. References f, input_matrix, PLearn::Var::length(), transpose, and PLearn::Var::width(). |
|
Definition at line 59 of file UnfoldedFuncVariable.h. Referenced by build_(), makeDeepCopyFromShallowCopy(), and recomputeSize(). |
|
Definition at line 64 of file UnfoldedFuncVariable.h. Referenced by bprop(), build_(), fprop(), makeDeepCopyFromShallowCopy(), and printInfo(). |
|
Definition at line 58 of file UnfoldedFuncVariable.h. Referenced by bprop(), build_(), fprop(), makeDeepCopyFromShallowCopy(), printInfo(), and recomputeSize(). |
|
Definition at line 62 of file UnfoldedFuncVariable.h. Referenced by build_(), fprop(), and makeDeepCopyFromShallowCopy(). |
|
Definition at line 63 of file UnfoldedFuncVariable.h. Referenced by bprop(), build_(), fprop(), makeDeepCopyFromShallowCopy(), and printInfo(). |
|
Definition at line 60 of file UnfoldedFuncVariable.h. Referenced by bprop(), build_(), fprop(), printInfo(), and recomputeSize(). |