PLearn 0.1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types
PLearn::MatrixAffineTransformFeedbackVariable Class Reference

Affine transformation of a MATRIX variable. More...

#include <MatrixAffineTransformFeedbackVariable.h>

Inheritance diagram for PLearn::MatrixAffineTransformFeedbackVariable:
Inheritance graph
[legend]
Collaboration diagram for PLearn::MatrixAffineTransformFeedbackVariable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MatrixAffineTransformFeedbackVariable ()
 Default constructor for persistence.
 MatrixAffineTransformFeedbackVariable (Variable *g, Variable *input)
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () 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 PPathdeclaringFile ()

Static Public Attributes

static StaticInitializer _static_initializer_

Private Types

typedef BinaryVariable inherited

Detailed Description

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.


Member Typedef Documentation

Reimplemented from PLearn::BinaryVariable.

Definition at line 59 of file MatrixAffineTransformFeedbackVariable.h.


Constructor & Destructor Documentation

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.

        : inherited(g, input, g->length()+1, input->length())
    {}

Member Function Documentation

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.

bool PLearn::MatrixAffineTransformFeedbackVariable::_isa_ ( const Object o) [static]

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);
}

Here is the call graph for this function:

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.


Member Data Documentation

Reimplemented from PLearn::BinaryVariable.

Definition at line 68 of file MatrixAffineTransformFeedbackVariable.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines