Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::AffineTransformWeightPenalty Class Reference

Weight decay terms for affine transforms. More...

#include <AffineTransformWeightPenalty.h>

Inheritance diagram for PLearn::AffineTransformWeightPenalty:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AffineTransformWeightPenalty ()
 Default constructor for persistence.

 AffineTransformWeightPenalty (Variable *affinetransform, real weight_decay, real bias_decay=0., bool L1_penalty=false)
 PLEARN_DECLARE_OBJECT (AffineTransformWeightPenalty)
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 ()

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)


Protected Attributes

real weight_decay_
real bias_decay_
bool L1_penalty_

Private Types

typedef UnaryVariable inherited

Detailed Description

Weight decay terms for affine transforms.

Definition at line 53 of file AffineTransformWeightPenalty.h.


Member Typedef Documentation

typedef UnaryVariable PLearn::AffineTransformWeightPenalty::inherited [private]
 

Reimplemented from PLearn::UnaryVariable.

Definition at line 55 of file AffineTransformWeightPenalty.h.


Constructor & Destructor Documentation

PLearn::AffineTransformWeightPenalty::AffineTransformWeightPenalty  )  [inline]
 

Default constructor for persistence.

Definition at line 64 of file AffineTransformWeightPenalty.h.

References bias_decay_, L1_penalty_, and weight_decay_.

PLearn::AffineTransformWeightPenalty::AffineTransformWeightPenalty Variable affinetransform,
real  weight_decay,
real  bias_decay = 0.,
bool  L1_penalty = false
[inline]
 

Definition at line 67 of file AffineTransformWeightPenalty.h.

References bias_decay_, L1_penalty_, and weight_decay_.


Member Function Documentation

void PLearn::AffineTransformWeightPenalty::bprop  )  [virtual]
 

Implements PLearn::Variable.

Definition at line 87 of file AffineTransformWeightPenalty.cc.

References bias_decay_, L1_penalty_, PLearn::Var::length(), PLearn::multiplyAcc(), PLERROR, PLearn::two(), weight_decay_, and PLearn::Var::width().

void PLearn::AffineTransformWeightPenalty::declareOptions OptionList ol  )  [static]
 

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 56 of file AffineTransformWeightPenalty.cc.

References PLearn::declareOption(), and PLearn::OptionList.

void PLearn::AffineTransformWeightPenalty::fprop  )  [virtual]
 

compute output given input

Implements PLearn::Variable.

Definition at line 64 of file AffineTransformWeightPenalty.cc.

References bias_decay_, L1_penalty_, PLearn::Var::length(), PLearn::sumabs(), PLearn::sumsquare(), and weight_decay_.

PLearn::AffineTransformWeightPenalty::PLEARN_DECLARE_OBJECT AffineTransformWeightPenalty   ) 
 

void PLearn::AffineTransformWeightPenalty::recomputeSize int l,
int w
const [virtual]
 

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 52 of file AffineTransformWeightPenalty.cc.


Member Data Documentation

real PLearn::AffineTransformWeightPenalty::bias_decay_ [protected]
 

Definition at line 59 of file AffineTransformWeightPenalty.h.

Referenced by AffineTransformWeightPenalty(), bprop(), and fprop().

bool PLearn::AffineTransformWeightPenalty::L1_penalty_ [protected]
 

Definition at line 60 of file AffineTransformWeightPenalty.h.

Referenced by AffineTransformWeightPenalty(), bprop(), and fprop().

real PLearn::AffineTransformWeightPenalty::weight_decay_ [protected]
 

Definition at line 58 of file AffineTransformWeightPenalty.h.

Referenced by AffineTransformWeightPenalty(), bprop(), and fprop().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:24:37 2004 for PLearn by doxygen 1.3.7