#include <AffineTransformWeightPenalty.h>
Inheritance diagram for PLearn::AffineTransformWeightPenalty:
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 |
Definition at line 53 of file AffineTransformWeightPenalty.h.
|
Reimplemented from PLearn::UnaryVariable. Definition at line 55 of file AffineTransformWeightPenalty.h. |
|
Default constructor for persistence.
Definition at line 64 of file AffineTransformWeightPenalty.h. References bias_decay_, L1_penalty_, and weight_decay_. |
|
Definition at line 67 of file AffineTransformWeightPenalty.h. References bias_decay_, L1_penalty_, and weight_decay_. |
|
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(). |
|
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. |
|
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_. |
|
|
|
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. |
|
Definition at line 59 of file AffineTransformWeightPenalty.h. Referenced by AffineTransformWeightPenalty(), bprop(), and fprop(). |
|
Definition at line 60 of file AffineTransformWeightPenalty.h. Referenced by AffineTransformWeightPenalty(), bprop(), and fprop(). |
|
Definition at line 58 of file AffineTransformWeightPenalty.h. Referenced by AffineTransformWeightPenalty(), bprop(), and fprop(). |