|
PLearn 0.1
|
Affine transformation of a MATRIX variable. More...
#include <MatrixAffineTransformFeedbackVariable.h>


Public Member Functions | |
| MatrixAffineTransformFeedbackVariable () | |
| Default constructor for persistence. | |
| MatrixAffineTransformFeedbackVariable (Variable *g, Variable *input) | |
| virtual string | classname () const |
| virtual OptionList & | getOptionList () const |
| virtual OptionMap & | getOptionMap () const |
| virtual RemoteMethodMap & | getRemoteMethodMap () const |
| virtual MatrixAffineTransformFeedbackVariable * | deepCopy (CopiesMap &copies) const |
| virtual void | fprop () |
| compute output given input | |
| virtual void | bprop () |
Static Public Member Functions | |
| static string | _classname_ () |
| static OptionList & | _getOptionList_ () |
| static RemoteMethodMap & | _getRemoteMethodMap_ () |
| static Object * | _new_instance_for_typemap_ () |
| static bool | _isa_ (const Object *o) |
| static void | _static_initialize_ () |
| static const PPath & | declaringFile () |
Static Public Attributes | |
| static StaticInitializer | _static_initializer_ |
Private Types | |
| typedef BinaryVariable | inherited |
Affine transformation of a MATRIX variable.
Should work for both column and row vectors: result vector will be of same kind (row or col) First row of transformation matrix contains bias b, following rows contain linear-transformation T Will compute b + x.T which is equivalent to b +
Definition at line 57 of file MatrixAffineTransformFeedbackVariable.h.
typedef BinaryVariable PLearn::MatrixAffineTransformFeedbackVariable::inherited [private] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 59 of file MatrixAffineTransformFeedbackVariable.h.
| PLearn::MatrixAffineTransformFeedbackVariable::MatrixAffineTransformFeedbackVariable | ( | ) | [inline] |
Default constructor for persistence.
Definition at line 63 of file MatrixAffineTransformFeedbackVariable.h.
{}
| PLearn::MatrixAffineTransformFeedbackVariable::MatrixAffineTransformFeedbackVariable | ( | Variable * | g, |
| Variable * | input | ||
| ) | [inline] |
Definition at line 64 of file MatrixAffineTransformFeedbackVariable.h.
| string PLearn::MatrixAffineTransformFeedbackVariable::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
| OptionList & PLearn::MatrixAffineTransformFeedbackVariable::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
| RemoteMethodMap & PLearn::MatrixAffineTransformFeedbackVariable::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
| Object * PLearn::MatrixAffineTransformFeedbackVariable::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
| StaticInitializer MatrixAffineTransformFeedbackVariable::_static_initializer_ & PLearn::MatrixAffineTransformFeedbackVariable::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
| virtual void PLearn::MatrixAffineTransformFeedbackVariable::bprop | ( | ) | [inline, virtual] |
Implements PLearn::Variable.
Definition at line 72 of file MatrixAffineTransformFeedbackVariable.h.
{};
| string PLearn::MatrixAffineTransformFeedbackVariable::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
| static const PPath& PLearn::MatrixAffineTransformFeedbackVariable::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 68 of file MatrixAffineTransformFeedbackVariable.h.
{};
| MatrixAffineTransformFeedbackVariable * PLearn::MatrixAffineTransformFeedbackVariable::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
| void PLearn::MatrixAffineTransformFeedbackVariable::fprop | ( | ) | [virtual] |
compute output given input
Implements PLearn::Variable.
Definition at line 59 of file MatrixAffineTransformFeedbackVariable.cc.
References PLearn::TMat< T >::firstRow(), i, j, PLearn::TMat< T >::length(), PLWARNING, PLearn::productTransposeAcc(), and PLearn::TMat< T >::subMatRows().
{
Mat& afftr = matValue;
int l = afftr.length();
// Mat lintr = afftr.subMatRows(1,l-1);
PLWARNING("In MatrixAffineTransformFeedbackVariable::fprop - The variable 'lintr' was defined but not used, this is weird. Someone should check this code is valid");
Mat& afftr_g = matGradient;
Vec bias_g = afftr_g.firstRow();
Mat lintr_g = afftr_g.subMatRows(1,l-1);
for (int i = 0; i < input1->length(); i++)
for (int j = 0; j < input1->width(); j++)
{
bias_g[i] += input1->matGradient[i][j];
}
productTransposeAcc(lintr_g, input2->matValue, input1->matGradient);
}

| OptionList & PLearn::MatrixAffineTransformFeedbackVariable::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
| OptionMap & PLearn::MatrixAffineTransformFeedbackVariable::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
| RemoteMethodMap & PLearn::MatrixAffineTransformFeedbackVariable::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file MatrixAffineTransformFeedbackVariable.cc.
Reimplemented from PLearn::BinaryVariable.
Definition at line 68 of file MatrixAffineTransformFeedbackVariable.h.
1.7.4