#include <DiagonalizedFactorsProductVariable.h>
Inheritance diagram for PLearn::DiagonalizedFactorsProductVariable:
Public Member Functions | |
DiagonalizedFactorsProductVariable () | |
Default constructor for persistence. | |
DiagonalizedFactorsProductVariable (Var left_matrix, Var center_diagonal, Var right_matrix, bool transpose_left=false, bool transpose_right=false) | |
PLEARN_DECLARE_OBJECT (DiagonalizedFactorsProductVariable) | |
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 () |
Var & | leftMatrix () |
Var & | centerDiagonal () |
Var & | rightMatrix () |
Public Attributes | |
bool | transpose_left |
bool | transpose_right |
Protected Member Functions | |
void | build_ () |
Private Types | |
typedef NaryVariable | inherited |
Definition at line 58 of file DiagonalizedFactorsProductVariable.h.
|
Reimplemented from PLearn::NaryVariable. Definition at line 60 of file DiagonalizedFactorsProductVariable.h. Referenced by DiagonalizedFactorsProductVariable(). |
|
Default constructor for persistence.
Definition at line 66 of file DiagonalizedFactorsProductVariable.h. |
|
Definition at line 59 of file DiagonalizedFactorsProductVariable.cc. |
|
|
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 73 of file DiagonalizedFactorsProductVariable.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 80 of file DiagonalizedFactorsProductVariable.cc. References centerDiagonal(), leftMatrix(), PLearn::Var::length(), PLERROR, rightMatrix(), PLearn::TVec< Var >::size(), transpose_left, transpose_right, and PLearn::Var::width(). Referenced by build(), and DiagonalizedFactorsProductVariable(). |
|
Definition at line 78 of file DiagonalizedFactorsProductVariable.h. |
|
compute output given input
Implements PLearn::Variable. Definition at line 100 of file DiagonalizedFactorsProductVariable.cc. References centerDiagonal(), PLearn::diagonalizedFactorsProduct(), PLearn::diagonalizedFactorsProductTranspose(), PLearn::diagonalizedFactorsTransposeProduct(), PLearn::diagonalizedFactorsTransposeProductTranspose(), leftMatrix(), rightMatrix(), transpose_left, and transpose_right. |
|
Definition at line 77 of file DiagonalizedFactorsProductVariable.h. |
|
|
|
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 91 of file DiagonalizedFactorsProductVariable.cc. References PLearn::TVec< Var >::size(), transpose_left, and transpose_right. |
|
Definition at line 79 of file DiagonalizedFactorsProductVariable.h. |
|
Definition at line 63 of file DiagonalizedFactorsProductVariable.h. Referenced by bprop(), build_(), fprop(), and recomputeSize(). |
|
Definition at line 63 of file DiagonalizedFactorsProductVariable.h. Referenced by bprop(), build_(), fprop(), and recomputeSize(). |