PLearn 0.1
|
#include <Variable.h>
Public Member Functions | |
Variable () | |
Default constructor for persistence. | |
Variable (int thelength, int thewidth, bool call_build_=true) | |
Variable (const Mat &m, bool call_build_=true) | |
this variable's value and m will be views of the same data | |
int | length () const |
int | width () const |
int | size () const |
int | nelems () const |
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. | |
void | resize (int l, int w) |
resizes the matValue and matGradient fields of this variable (and updates the value, gradient, valuedata and gradientdata fields accordingly) | |
void | sizeprop () |
resizes value and gradient fields according to size given by recomputeSize(...) This corresponds to "propagating" the size from its parent's size, much as fprop propagates the values | |
virtual void | setParents (const VarArray &parents) |
set this Variable's parents. To use with default constructor. | |
Variable (const Variable &v) | |
Copy constructor. | |
virtual void | build () |
Post-constructor. | |
bool | isScalar () const |
bool | isVec () const |
bool | isColumnVec () const |
bool | isRowVec () const |
virtual Variable * | deepCopy (CopiesMap &copies) const |
virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
Does the necessary operations to transform a shallow copy (this) into a deep copy by deep-copying all the members that need to be. | |
virtual void | fprop ()=0 |
compute output given input | |
void | sizefprop () |
compute dC/dinput given dC/doutput | |
virtual void | bprop ()=0 |
virtual void | bbprop () |
compute an approximation to diag(d^2/dinput^2) given diag(d^2/doutput^2), with diag(d^2/dinput^2) ~=~ (doutput/dinput)' diag(d^2/doutput^2) (doutput/dinput) In particular: if 'C' depends on 'y' and 'y' depends on x ... | |
virtual void | fbprop () |
do both fprop and bprop | |
virtual void | fbbprop () |
do fprop, bprop and bbprop | |
virtual void | symbolicBprop () |
compute a piece of new Var graph that represents the symbolic derivative of this Var | |
virtual void | rfprop () |
virtual void | copyValueInto (Vec v) |
virtual void | copyGradientInto (Vec g) |
string | getName () const |
returns the name of this variable. | |
void | setName (const string &the_name) |
call this to set a name for this variable | |
bool | nameIsSet () |
Mat | defineValueLocation (const Mat &m) |
Defines a new Mat to use as this Var's matValue field, modifies value and valuedata to keep consistent, and returns the previous matValue. | |
Mat | defineGradientLocation (const Mat &m) |
Defines a new Mat to use as this Var's matGradient field, modifies gradient and gradientdata to keep consistent, and returns the previous matGradient. | |
virtual void | printInfo (bool print_gradient=false)=0 |
virtual void | printInfos (bool print_gradient=false) |
Var | subVec (int start, int len, bool transpose=false) |
Var | subMat (int i, int j, int sublength, int subwidth, bool transpose=false) |
Var | row (int i, bool transpose=false) |
Var | column (int j, bool transpose=false) |
void | setDontBpropHere (bool val) |
void | setKeepPositive () |
void | setMinValue (real minv=-FLT_MAX) |
void | setMaxValue (real maxv=FLT_MAX) |
void | setBoxConstraint (real minv, real maxv) |
void | setMark () |
void | clearMark () |
bool | isMarked () |
void | fillGradient (real value) |
void | fillValue (real val) |
void | setValueSubMat (const Mat &submat, int istart, int jstart) |
Replace with 'submat' the sub-matrix of the value starting at row 'istart' and column 'jstart'. | |
void | clearRowsToUpdate () |
void | clearGradient () |
void | clearDiagHessian () |
void | clearSymbolicGradient () |
virtual bool | update (real step_size, Vec direction_vec, real coeff=1.0, real b=0.0) |
set value = value + (step_size * coeff + b) * direction | |
virtual bool | update (Vec step_sizes, Vec direction_vec, real coeff=1.0, real b=0.0) |
set value[i] = value[i] + (step_sizes[i]*coeff + b) * direction[i] | |
virtual bool | update (real step_size, bool clear=false) |
set value = value + step_size * gradient | |
virtual bool | update (Vec new_value) |
set value = new_value | |
virtual void | updateAndClear () |
Set value += gradient (respecting potential box constraints), and clear the gradient. | |
virtual void | updateWithWeightDecay (real step_size, real weight_decay, bool L1, bool clear=true) |
if (L1) value += learning_rate*gradient decrease |value| by learning_rate*weight_decay if it does not make value change sign else // L2 value += learning_rate*(gradient - weight_decay*value) if (clear) gradient=0 | |
void | allowPartialUpdates () |
send message that update may be sometimes needed on only parts of the Variable | |
void | disallowPartialUpdates () |
send message that updates must be full. | |
void | updateRow (int row) |
says that given row has received gradient (should be updated on next call to update) | |
real | maxUpdate (Vec direction) |
Using the box constraints on the values, return the maximum allowable step_size in the given direction i.e.,. | |
virtual bool | markPath ()=0 |
Sets the marked flag of all the sVariable that are to be in the fprop path. | |
virtual void | buildPath (VarArray &proppath)=0 |
Finally buildPath is to be called from the output Variable of interest (this will build the proppath at the same time as erasing the marks) | |
virtual void | oldread (istream &in) |
virtual void | write (ostream &out) const |
Write the object to a C++ ostream . | |
void | copyFrom (const Vec &v) |
void | copyTo (Vec &v) |
void | copyGradientFrom (const Vec &v) |
void | copyGradientTo (Vec &v) |
void | makeSharedValue (real *x, int n) |
like copyTo but also makes value's point to x | |
void | makeSharedGradient (real *x, int n) |
like copyTo but also makes value's point to x | |
void | makeSharedValue (PP< Storage< real > > storage, int offset_=0) |
make value and matValue point into this storage | |
void | makeSharedGradient (PP< Storage< real > > storage, int offset_=0) |
void | makeSharedValue (Vec &v, int offset_=0) |
void | makeSharedGradient (Vec &v, int offset_=0) |
void | copyRValueFrom (const Vec &v) |
void | copyRValueTo (Vec &v) |
void | makeSharedRValue (real *x, int n) |
like copyTo but also makes value's point to x | |
void | makeSharedRValue (PP< Storage< real > > storage, int offset_=0) |
void | makeSharedRValue (Vec &v, int offset_=0) |
void | makePointTo (Variable *v) |
virtual bool | isConstant () |
virtual void | fprop_from_all_sources () |
Find all constant sources that influence this Variable, build a propagation path from them to this Variable, and fprop through it. | |
virtual VarArray | sources ()=0 |
if not marked, find all constant sources that influence this Variable. | |
virtual VarArray | random_sources ()=0 |
return ancestors which compute a non-deterministic function of their parents | |
virtual VarArray | ancestors ()=0 |
if not marked, find all Variables that influence this Variable. | |
virtual void | unmarkAncestors ()=0 |
undo any marking done by a call to sources() or ancestors() | |
virtual VarArray | parents ()=0 |
returns all the direct parents of this Var that are not marked (the call doesn't change any mark) | |
virtual void | accg (Var v) |
accumulate the symbolic gradient in a smart way... | |
virtual void | verifyGradient (real step=0.001) |
call verify gradient for the mapping from all the sources to this Variable. | |
virtual void | resizeDiagHessian () |
resize the DiagHessian field | |
virtual void | resizeRValue () |
Static Public Member Functions | |
static string | _classname_ () |
static OptionList & | _getOptionList_ () |
static RemoteMethodMap & | _getRemoteMethodMap_ () |
static bool | _isa_ (const Object *o) |
static void | _static_initialize_ () |
static const PPath & | declaringFile () |
Public Attributes | |
int | varnum |
number of this variable (the first one created is numbered 1, the second 2, etc...) | |
Vec | value |
Vec | gradient |
Mat | matValue |
Mat | matGradient |
Vec | rValue |
Mat | matRValue |
Mat | matDiagHessian |
optionally computed second derivative (see bbprop methods) | |
real * | valuedata |
Convenience variables. | |
real * | gradientdata |
set to gradient.data() | |
real | min_value |
real | max_value |
box constraints on values | |
Var | g |
symbolic gradient used for symbolicBprop | |
Vec | diaghessian |
optionally computed second derivative (see bbprop methods) | |
real * | diaghessiandata |
set to diaghessian.data() or NULL if no diaghessian | |
real * | rvaluedata |
bool | dont_bprop_here |
if true, children are encouraged not to bprop gradient in this var (saves computation time) | |
Static Public Attributes | |
static int | nvars = 0 |
keeps track of how many vars have been created (also used for the default naming scheme, see getName() ) | |
static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declare options (data fields) for the class. | |
static void | declareMethods (RemoteMethodMap &rmm) |
Declare the methods that are remote-callable. | |
Protected Attributes | |
bool | marked |
used for building the propagation paths | |
string | varname |
used when printing or drawing the var graph (see setName and getName) | |
bool | allows_partial_update |
only if this is true then the following two fields are used. | |
int | gradient_status |
0: no gradient was accumulated, 1: to some rows, 2: everywhere. | |
TVec< int > | rows_to_update |
the list of rows to update. | |
Private Types | |
typedef Object | inherited |
Private Member Functions | |
void | build_ () |
Object-specific post-constructor. | |
Friends | |
class | Var |
class | RandomVariable |
class | ProductRandomVariable |
class | Function |
class | UnaryVariable |
class | BinaryVariable |
class | NaryVariable |
Definition at line 103 of file Variable.h.
typedef Object PLearn::Variable::inherited [private] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 108 of file Variable.h.
PLearn::Variable::Variable | ( | ) | [inline] |
Default constructor for persistence.
Definition at line 113 of file Variable.h.
: varnum(++nvars), marked(false), varname(), allows_partial_update(false), gradient_status(0), valuedata(0), gradientdata(0), min_value(-FLT_MAX), max_value(FLT_MAX), dont_bprop_here(false) {}
Definition at line 190 of file Variable.cc.
References build_(), PLearn::TVec< T >::data(), PLearn::TVec< T >::getStorage(), gradient, gradientdata, matGradient, matValue, PLearn::TMat< T >::toVec(), value, and valuedata.
: inherited(call_build_), varnum(++nvars), marked(false), varname(""), allows_partial_update(false), gradient_status(0), matValue(thelength,thewidth), matGradient(thelength,thewidth), min_value(-FLT_MAX), max_value(FLT_MAX), diaghessiandata(0), rvaluedata(0), dont_bprop_here(false) { value = matValue.toVec(); gradient = matGradient.toVec(); if(value.getStorage()) valuedata = value.data(); else valuedata = 0; if (gradient.getStorage()) gradientdata = gradient.data(); else gradientdata = 0; if (call_build_) build_(); }
this variable's value and m will be views of the same data
Definition at line 212 of file Variable.cc.
References build_(), PLearn::TVec< T >::data(), PLearn::TVec< T >::getStorage(), gradient, gradientdata, PLearn::TMat< T >::isCompact(), matGradient, matValue, PLERROR, PLearn::TMat< T >::toVec(), value, and valuedata.
:varnum(++nvars), marked(false), varname(""), allows_partial_update(false), gradient_status(0), matValue(m), matGradient(m.length(),m.width()), min_value(-FLT_MAX), max_value(FLT_MAX), diaghessiandata(0), rvaluedata(0), dont_bprop_here(false) { if(!m.isCompact()) PLERROR("To be able to construct a Var that views the same data as a Mat m, the Mat must be compact (width()==mod()). Maybe you can use m.copy() instead of m?"); value = matValue.toVec(); gradient = matGradient.toVec(); if(value.getStorage()) valuedata = value.data(); else valuedata = 0; if (gradient.getStorage()) gradientdata = gradient.data(); else gradientdata = 0; if (call_build_) build_(); }
PLearn::Variable::Variable | ( | const Variable & | v | ) |
Copy constructor.
Definition at line 236 of file Variable.cc.
:varnum(++nvars), marked(false), varname(v.getName()), allows_partial_update(v.allows_partial_update), gradient_status(v.gradient_status), value(v.value), gradient(v.gradient), matValue(v.matValue),matGradient(v.matGradient), valuedata(v.valuedata), gradientdata(v.gradientdata), min_value(v.min_value),max_value(v.max_value), g(v.g), diaghessian(v.diaghessian), diaghessiandata(v.diaghessiandata), rvaluedata(v.rvaluedata), dont_bprop_here(v.dont_bprop_here) {}
string PLearn::Variable::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 465 of file Variable.cc.
OptionList & PLearn::Variable::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 465 of file Variable.cc.
RemoteMethodMap & PLearn::Variable::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 465 of file Variable.cc.
Reimplemented from PLearn::Object.
Reimplemented in PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 465 of file Variable.cc.
StaticInitializer Variable::_static_initializer_ & PLearn::Variable::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 465 of file Variable.cc.
void PLearn::Variable::accg | ( | Var | v | ) | [virtual] |
accumulate the symbolic gradient in a smart way...
Definition at line 567 of file Variable.cc.
References g, PLearn::Var::length(), length(), Var, width(), and PLearn::Var::width().
Referenced by PLearn::MatrixAffineTransformVariable::symbolicBprop().
{ if(g || (vg.length()==length() && vg.width()==width())) g += vg; else // g does not exist { g = Var(length(),width()); g += vg; } }
void PLearn::Variable::allowPartialUpdates | ( | ) | [inline] |
send message that update may be sometimes needed on only parts of the Variable
Definition at line 360 of file Variable.h.
Referenced by PLearn::HeterogenuousAffineTransformVariable::build_(), and PLearn::HeterogenuousAffineTransformWeightPenalty::build_().
{ allows_partial_update=true; rows_to_update.resize(length()); // make sure that there are always enough elements rows_to_update.resize(0); gradient_status=0; }
virtual VarArray PLearn::Variable::ancestors | ( | ) | [pure virtual] |
if not marked, find all Variables that influence this Variable.
Implemented in PLearn::BinaryVariable, PLearn::NaryVariable, PLearn::ObjectOptionVariable, PLearn::SourceVariable, and PLearn::UnaryVariable.
Referenced by printInfos().
void PLearn::Variable::bbprop | ( | ) | [virtual] |
compute an approximation to diag(d^2/dinput^2) given diag(d^2/doutput^2), with diag(d^2/dinput^2) ~=~ (doutput/dinput)' diag(d^2/doutput^2) (doutput/dinput) In particular: if 'C' depends on 'y' and 'y' depends on x ...
d^2C/dx^2 = d^2C/dy^2 * (dy/dx)^2 + dC/dy * d^2y/dx^2 (diaghessian) (gradient)
Reimplemented in PLearn::DotProductVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::NonDiagVariable, PLearn::TraceVariable, PLearn::ExtractVariable, PLearn::IdentityVariable, PLearn::InsertZerosVariable, PLearn::LogSoftmaxVariable, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusVariable, PLearn::NegateElementsVariable, PLearn::ObjectOptionVariable, PLearn::PDistributionVariable, PLearn::PlusColumnVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::SigmoidVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SourceVariable, PLearn::SquareVariable, PLearn::SubMatVariable, PLearn::TanhVariable, and PLearn::TransposeProductVariable.
Definition at line 506 of file Variable.cc.
References PLearn::Object::classname(), and PLERROR.
Referenced by fbbprop().
virtual void PLearn::Variable::bprop | ( | ) | [pure virtual] |
Implemented in PLearn::SourceSampleVariable, PLearn::UnarySampleVariable, PLearn::BinarySampleVariable, PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Referenced by fbbprop(), and fbprop().
void PLearn::Variable::build | ( | ) | [virtual] |
Post-constructor.
The normal implementation 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::Object.
Reimplemented in PLearn::AffineTransformVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::CrossEntropyVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixElementsVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::PDistributionVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SoftmaxLossVariable, PLearn::SoftplusVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 331 of file Variable.cc.
References PLearn::Object::build(), and build_().
Referenced by PLearn::UnaryVariable::build(), PLearn::SourceVariable::build(), PLearn::ObjectOptionVariable::build(), PLearn::NaryVariable::build(), and PLearn::BinaryVariable::build().
{ inherited::build(); build_(); }
void PLearn::Variable::build_ | ( | ) | [private] |
Object-specific post-constructor.
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 its parent's build_()
has already been called.
Reimplemented from PLearn::Object.
Reimplemented in PLearn::AffineTransformVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::CrossEntropyVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixElementsVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::PDistributionVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SoftmaxLossVariable, PLearn::SoftplusVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 308 of file Variable.cc.
References length(), recomputeSize(), resize(), w, and width().
Referenced by build(), and Variable().
{ int l_previous = length(); int w_previous = width(); int l, w; recomputeSize(l, w); if(l==0 || w==0) { l = l_previous; w = w_previous; } // we call resize in all cases, even if we already had matValue correctly sized // the call to resize makes sure that value, valuedata, matGradient, gradient, gradientdata // are correctly sized and initialized. resize(l, w); //if (l && w && (l != l_previous || w != w_previous)) // resize(l, w); }
virtual void PLearn::Variable::buildPath | ( | VarArray & | proppath | ) | [pure virtual] |
Finally buildPath is to be called from the output Variable of interest (this will build the proppath at the same time as erasing the marks)
Implemented in PLearn::BinaryVariable, PLearn::NaryVariable, PLearn::ObjectOptionVariable, PLearn::SourceVariable, and PLearn::UnaryVariable.
void PLearn::Variable::clearDiagHessian | ( | ) |
Definition at line 485 of file Variable.cc.
References PLearn::TVec< T >::clear(), diaghessian, and resizeDiagHessian().
{ if(!diaghessian) resizeDiagHessian(); diaghessian.clear(); }
void PLearn::Variable::clearGradient | ( | ) | [inline] |
Definition at line 290 of file Variable.h.
{ if(!allows_partial_update) gradient.clear(); else { for (int r=0;r<rows_to_update.length();r++) { int row = rows_to_update[r]; matGradient.row(row).clear(); } rows_to_update.resize(0); gradient_status=0; } }
void PLearn::Variable::clearMark | ( | ) | [inline] |
Definition at line 275 of file Variable.h.
Referenced by PLearn::BinaryVariable::buildPath(), PLearn::UnaryVariable::buildPath(), PLearn::SourceVariable::buildPath(), PLearn::ObjectOptionVariable::buildPath(), PLearn::NaryVariable::buildPath(), PLearn::ObjectOptionVariable::unmarkAncestors(), and PLearn::SourceVariable::unmarkAncestors().
{ marked = false; }
void PLearn::Variable::clearRowsToUpdate | ( | ) | [inline] |
Definition at line 285 of file Variable.h.
{ rows_to_update.resize(0); gradient_status=0; }
void PLearn::Variable::clearSymbolicGradient | ( | ) | [inline] |
Definition at line 266 of file Variable.h.
References PLearn::subMat(), and PLearn::transpose().
void PLearn::Variable::copyFrom | ( | const Vec & | v | ) | [inline] |
Definition at line 410 of file Variable.h.
{ value << v; }
void PLearn::Variable::copyGradientFrom | ( | const Vec & | v | ) | [inline] |
Definition at line 412 of file Variable.h.
{ gradient << v; }
virtual void PLearn::Variable::copyGradientInto | ( | Vec | g | ) | [inline, virtual] |
Definition at line 235 of file Variable.h.
void PLearn::Variable::copyGradientTo | ( | Vec & | v | ) | [inline] |
Definition at line 413 of file Variable.h.
{ v << gradient; }
void PLearn::Variable::copyRValueFrom | ( | const Vec & | v | ) | [inline] |
Definition at line 422 of file Variable.h.
{ resizeRValue(); rValue << v; }
void PLearn::Variable::copyRValueTo | ( | Vec & | v | ) | [inline] |
Definition at line 423 of file Variable.h.
{ resizeRValue(); v << rValue; }
void PLearn::Variable::copyTo | ( | Vec & | v | ) | [inline] |
Definition at line 411 of file Variable.h.
{ v << value; }
virtual void PLearn::Variable::copyValueInto | ( | Vec | v | ) | [inline, virtual] |
Definition at line 234 of file Variable.h.
{ v << value; }
void PLearn::Variable::declareMethods | ( | RemoteMethodMap & | rmm | ) | [static, protected] |
Declare the methods that are remote-callable.
Reimplemented from PLearn::Object.
Definition at line 276 of file Variable.cc.
References PLearn::Object::_getRemoteMethodMap_(), PLearn::declareMethod(), fillValue(), fprop(), PLearn::RemoteMethodMap::inherited(), setMinValue(), and setValueSubMat().
{ // Insert a backpointer to remote methods; note that this // different than for declareOptions() rmm.inherited(inherited::_getRemoteMethodMap_()); declareMethod( rmm, "fillValue", &Variable::fillValue, (BodyDoc("Fill value with the given constant"), ArgDoc ("val", "Value to fill with"))); declareMethod( rmm, "setValueSubMat", &Variable::setValueSubMat, (BodyDoc("Replace a sub-matrix of the value with the given data"), ArgDoc ("submat", "Data to set (as a matrix)"), ArgDoc ("istart", "Row where 'submat' is inserted"), ArgDoc ("jstart", "Column where 'submat' is inserted"))); declareMethod( rmm, "setMinValue", &Variable::setMinValue, (BodyDoc("Set box constraint (minimum bound) on this Variable."), ArgDoc ("val", "Minimum value it can take"))); declareMethod( rmm, "fprop", &Variable::fprop, (BodyDoc("Update value of this Var"))); }
void PLearn::Variable::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declare options (data fields) for the class.
Redefine this in subclasses: call declareOption
(...) for each option, and then call inherited::declareOptions(options)
. Please call the inherited
method AT THE END to get the options listed in a consistent order (from most recently defined to least recently defined).
static void MyDerivedClass::declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "The size of the input; it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "The learned model weights"); inherited::declareOptions(ol); }
ol | List of options that is progressively being constructed for the current class. |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ConcatOfVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::Cov2CorrVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TransposedDoubleProductVariable, PLearn::ExtendedVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IndexAtPositionVariable, PLearn::IsAboveThresholdVariable, PLearn::IsMissingVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixElementsVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::NaryVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::PDistributionVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::ThresholdBpropVariable, PLearn::TimesConstantVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VecElementVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, and PLearn::ScoreLayerVariable.
Definition at line 81 of file ConstrainVariable.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::Object::declareOptions(), and PLearn::ConstrainVariable::max_rowsum.
Referenced by PLearn::UnaryVariable::declareOptions(), PLearn::SourceVariable::declareOptions(), PLearn::ObjectOptionVariable::declareOptions(), PLearn::NaryVariable::declareOptions(), and PLearn::BinaryVariable::declareOptions().
{ declareOption(ol, "max_rowsum", &ConstrainVariable::max_rowsum, OptionBase::buildoption, "maximum value the sum of elements in a row is allowed to reach\n"); inherited::declareOptions(ol); }
static const PPath& PLearn::Variable::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 206 of file Variable.h.
Reimplemented from PLearn::Object.
Reimplemented in PLearn::SourceSampleVariable, PLearn::UniformSampleVariable, PLearn::MultinomialSampleVariable, PLearn::DiagonalNormalSampleVariable, PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 465 of file Variable.cc.
Defines a new Mat to use as this Var's matGradient field, modifies gradient and gradientdata to keep consistent, and returns the previous matGradient.
Also resizes the value in order to ensure it has same size as the new gradient.
Definition at line 415 of file Variable.cc.
References PLearn::TVec< T >::data(), PLearn::TVec< T >::getStorage(), gradient, gradientdata, PLearn::TMat< T >::isCompact(), PLearn::TMat< T >::length(), m, matGradient, matValue, PLERROR, PLearn::TMat< T >::resize(), PLearn::TMat< T >::setMod(), PLearn::TMat< T >::toVec(), value, valuedata, and PLearn::TMat< T >::width().
{ if(!m.isCompact()) PLERROR("In Variable::defineGradientLocation, Variables require" " compact matrices"); Mat oldm = matGradient; matGradient = m; gradient = matGradient.toVec(); if (gradient.getStorage()) gradientdata = gradient.data(); else gradientdata = 0; value = Vec(); // Temporarily frees a reference to value's storage. matValue.setMod(matGradient.width()); matValue.resize(matGradient.length(), matGradient.width()); value = matValue.toVec(); if(value.getStorage()) valuedata = value.data(); else valuedata = 0; return oldm; }
Defines a new Mat to use as this Var's matValue field, modifies value and valuedata to keep consistent, and returns the previous matValue.
Also resizes the gradient in order to ensure it has same size as the new value.
Definition at line 389 of file Variable.cc.
References PLearn::TVec< T >::data(), PLearn::TVec< T >::getStorage(), gradient, gradientdata, PLearn::TMat< T >::isCompact(), PLearn::TMat< T >::length(), m, matGradient, matValue, PLERROR, PLearn::TMat< T >::resize(), PLearn::TMat< T >::setMod(), PLearn::TMat< T >::toVec(), value, valuedata, and PLearn::TMat< T >::width().
{ if(!m.isCompact()) PLERROR("In Variable::defineValueLocation, Variables require compact" " matrices"); Mat oldm = matValue; matValue = m; value = matValue.toVec(); if(value.getStorage()) valuedata = value.data(); else valuedata = 0; gradient = Vec(); // Temporarily frees a reference to gradient's storage. matGradient.setMod(matValue.width()); matGradient.resize(matValue.length(), matValue.width()); gradient = matGradient.toVec(); if (gradient.getStorage()) gradientdata = gradient.data(); else gradientdata = 0; return oldm; }
void PLearn::Variable::disallowPartialUpdates | ( | ) | [inline] |
send message that updates must be full.
Definition at line 369 of file Variable.h.
{ allows_partial_update = false; gradient_status=2; }
void PLearn::Variable::fbbprop | ( | ) | [virtual] |
void PLearn::Variable::fbprop | ( | ) | [virtual] |
do both fprop and bprop
Reimplemented in PLearn::CCCostVariable, PLearn::ConcatOfVariable, PLearn::MatrixElementsVariable, PLearn::MatrixSumOfVariable, PLearn::RowOfVariable, PLearn::SumOfVariable, and PLearn::SumOverBagsVariable.
Definition at line 493 of file Variable.cc.
References bprop(), and fprop().
void PLearn::Variable::fillGradient | ( | real | value | ) | [inline] |
Definition at line 278 of file Variable.h.
{ gradient.fill(value); }
void PLearn::Variable::fillValue | ( | real | val | ) | [inline] |
Definition at line 279 of file Variable.h.
Referenced by declareMethods(), and PLearn::PlusManyVariable::fprop().
{ value.fill(val); }
virtual void PLearn::Variable::fprop | ( | ) | [pure virtual] |
compute output given input
Implemented in PLearn::UniformSampleVariable, PLearn::MultinomialSampleVariable, PLearn::DiagonalNormalSampleVariable, PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Referenced by declareMethods(), fbbprop(), and fbprop().
void PLearn::Variable::fprop_from_all_sources | ( | ) | [virtual] |
Find all constant sources that influence this Variable, build a propagation path from them to this Variable, and fprop through it.
This can be useful to make sure that all dependencies are computed at least once. This function uses source(), below.
Definition at line 552 of file Variable.cc.
References PLearn::VarArray::fprop(), PLearn::propagationPath(), sources(), unmarkAncestors(), and Var.
{ VarArray all_sources = sources(); unmarkAncestors(); VarArray prop_path = propagationPath(all_sources,Var(this)); prop_path.fprop(); }
string PLearn::Variable::getName | ( | ) | const |
returns the name of this variable.
If its name has not been set, it will be assigned a name of V_varnum
Definition at line 518 of file Variable.cc.
References PLearn::tostring(), varname, and varnum.
Referenced by PLearn::GaussianProcessNLLVariable::logVarray(), PLearn::UnfoldedSumOfVariable::printInfo(), PLearn::UnfoldedFuncVariable::printInfo(), PLearn::SumOverBagsVariable::printInfo(), PLearn::SumOfVariable::printInfo(), PLearn::MatrixSumOfVariable::printInfo(), and PLearn::CCCostVariable::printInfo().
bool PLearn::Variable::isColumnVec | ( | ) | const [inline] |
Definition at line 203 of file Variable.h.
Referenced by subVec().
{ return width()==1; }
virtual bool PLearn::Variable::isConstant | ( | ) | [inline, virtual] |
Reimplemented in PLearn::ObjectOptionVariable, and PLearn::SourceVariable.
Definition at line 445 of file Variable.h.
{ return false; }
bool PLearn::Variable::isMarked | ( | ) | [inline] |
Definition at line 276 of file Variable.h.
{ return marked; }
bool PLearn::Variable::isRowVec | ( | ) | const [inline] |
Definition at line 204 of file Variable.h.
Referenced by subVec().
{ return length()==1; }
bool PLearn::Variable::isScalar | ( | ) | const [inline] |
Definition at line 201 of file Variable.h.
Referenced by PLearn::IfThenElseVariable::bprop(), PLearn::SemiSupervisedProbClassCostVariable::build_(), PLearn::IfThenElseVariable::build_(), PLearn::DiagonalNormalSampleVariable::DiagonalNormalSampleVariable(), and PLearn::IfThenElseVariable::fprop().
bool PLearn::Variable::isVec | ( | ) | const [inline] |
Definition at line 202 of file Variable.h.
Referenced by PLearn::HeterogenuousAffineTransformVariable::build_(), PLearn::HeterogenuousAffineTransformWeightPenalty::build_(), and PLearn::Var::operator[]().
int PLearn::Variable::length | ( | ) | const [inline] |
Definition at line 166 of file Variable.h.
Referenced by accg(), PLearn::SubMatVariable::bbprop(), PLearn::PlusRowVariable::bbprop(), PLearn::PlusColumnVariable::bbprop(), PLearn::MinusRowVariable::bbprop(), PLearn::MinusColumnVariable::bbprop(), PLearn::TransposeVariable::bprop(), PLearn::TimesRowVariable::bprop(), PLearn::TimesColumnVariable::bprop(), PLearn::SubsampleVariable::bprop(), PLearn::SubMatVariable::bprop(), PLearn::SubMatTransposeVariable::bprop(), PLearn::ScoreLayerVariable::bprop(), PLearn::ProbabilityPairsVariable::bprop(), PLearn::PotentialsVariable::bprop(), PLearn::PlusRowVariable::bprop(), PLearn::PlusColumnVariable::bprop(), PLearn::MinusTransposedColumnVariable::bprop(), PLearn::MinusRowVariable::bprop(), PLearn::MinusColumnVariable::bprop(), PLearn::MatrixSoftmaxVariable::bprop(), PLearn::MatrixSoftmaxLossVariable::bprop(), PLearn::MatrixOneHotSquaredLoss::bprop(), PLearn::LogAddVariable::bprop(), PLearn::GradientAdaboostCostVariable::bprop(), PLearn::ExtractVariable::bprop(), PLearn::DuplicateRowVariable::bprop(), PLearn::DuplicateColumnVariable::bprop(), PLearn::ConvolveVariable::bprop(), PLearn::ConfRatedAdaboostCostVariable::bprop(), PLearn::MultiMaxVariable::bpropHardMaxValue(), PLearn::MultiMaxVariable::bpropLogSoftMax(), PLearn::MultiMaxVariable::bpropSoftMax(), build_(), PLearn::VarArrayElementVariable::build_(), PLearn::TransposedDoubleProductVariable::build_(), PLearn::SubMatVariable::build_(), PLearn::SemiSupervisedProbClassCostVariable::build_(), PLearn::ReshapeVariable::build_(), PLearn::PotentialsVariable::build_(), PLearn::PlusManyVariable::build_(), PLearn::ObjectOptionVariable::build_(), PLearn::NllSemisphericalGaussianVariable::build_(), PLearn::NllGeneralGaussianVariable::build_(), PLearn::IfThenElseVariable::build_(), PLearn::FNetLayerVariable::build_(), PLearn::ConcatColumnsVariable::build_(), PLearn::DiagonalNormalSampleVariable::DiagonalNormalSampleVariable(), PLearn::TransposeVariable::fprop(), PLearn::TimesRowVariable::fprop(), PLearn::TimesColumnVariable::fprop(), PLearn::SubMatVariable::fprop(), PLearn::SubMatTransposeVariable::fprop(), PLearn::ScoreLayerVariable::fprop(), PLearn::DiagonalNormalSampleVariable::fprop(), PLearn::PotentialsVariable::fprop(), PLearn::PlusRowVariable::fprop(), PLearn::PlusColumnVariable::fprop(), PLearn::NLLNeighborhoodWeightsVariable::fprop(), PLearn::MinusTransposedColumnVariable::fprop(), PLearn::MinusRowVariable::fprop(), PLearn::MinusColumnVariable::fprop(), PLearn::MatrixSoftmaxLossVariable::fprop(), PLearn::MatrixOneHotSquaredLoss::fprop(), PLearn::LogAddVariable::fprop(), PLearn::GradientAdaboostCostVariable::fprop(), PLearn::ExtractVariable::fprop(), PLearn::DuplicateRowVariable::fprop(), PLearn::DuplicateColumnVariable::fprop(), PLearn::ConfRatedAdaboostCostVariable::fprop(), PLearn::MultiMaxVariable::hardMax_range(), PLearn::MultiMaxVariable::logSoftmax_range(), recomputeSize(), PLearn::SoftSlopeVariable::recomputeSize(), PLearn::SoftSlopeIntegralVariable::recomputeSize(), PLearn::HardSlopeVariable::recomputeSize(), resizeDiagHessian(), resizeRValue(), PLearn::TimesRowVariable::rfprop(), PLearn::TimesColumnVariable::rfprop(), PLearn::SubMatVariable::rfprop(), PLearn::SubMatTransposeVariable::rfprop(), PLearn::PlusRowVariable::rfprop(), PLearn::PlusColumnVariable::rfprop(), PLearn::MultiMaxVariable::softmax_range(), PLearn::SVDVariable::SVDVariable(), PLearn::SubMatVariable::symbolicBprop(), PLearn::SubMatTransposeVariable::symbolicBprop(), PLearn::PowVariableVariable::symbolicBprop(), PLearn::IfThenElseVariable::symbolicBprop(), PLearn::ConcatColumnsVariable::symbolicBprop(), update(), and updateWithWeightDecay().
{ return matValue.length(); }
void PLearn::Variable::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Does the necessary operations to transform a shallow copy (this) into a deep copy by deep-copying all the members that need to be.
This needs to be overridden by every class that adds "complex" data members to the class, such as Vec
, Mat
, PP<Something>
, etc. Typical implementation:
void CLASS_OF_THIS::makeDeepCopyFromShallowCopy(CopiesMap& copies) { inherited::makeDeepCopyFromShallowCopy(copies); deepCopyField(complex_data_member1, copies); deepCopyField(complex_data_member2, copies); ... }
copies | A map used by the deep-copy mechanism to keep track of already-copied objects. |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::ArgminOfVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ConcatOfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TransposedDoubleProductVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::InsertZerosVariable, PLearn::IsMissingVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSumVariable, PLearn::MatrixElementsVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::NaryVariable, PLearn::NllGeneralGaussianVariable, PLearn::ObjectOptionVariable, PLearn::PDistributionVariable, PLearn::PlusManyVariable, PLearn::PotentialsVariable, PLearn::ReIndexedTargetVariable, PLearn::RowOfVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::UnaryVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VecElementVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::RunICPVariable, and PLearn::ScoreLayerVariable.
Definition at line 467 of file Variable.cc.
References PLearn::TVec< T >::data(), PLearn::deepCopyField(), g, PLearn::TVec< T >::getStorage(), gradient, gradientdata, PLearn::Object::makeDeepCopyFromShallowCopy(), matGradient, matValue, value, valuedata, and PLearn::varDeepCopyField().
Referenced by PLearn::UnaryVariable::makeDeepCopyFromShallowCopy(), PLearn::SourceVariable::makeDeepCopyFromShallowCopy(), PLearn::ObjectOptionVariable::makeDeepCopyFromShallowCopy(), PLearn::NaryVariable::makeDeepCopyFromShallowCopy(), and PLearn::BinaryVariable::makeDeepCopyFromShallowCopy().
{ inherited::makeDeepCopyFromShallowCopy(copies); deepCopyField(value, copies); deepCopyField(gradient, copies); deepCopyField(matValue, copies); deepCopyField(matGradient, copies); if (value.getStorage()) valuedata = value.data(); else valuedata = 0; if (gradient.getStorage()) gradientdata = gradient.data(); else gradientdata = 0; varDeepCopyField(g, copies); }
void PLearn::Variable::makePointTo | ( | Variable * | v | ) | [inline] |
Definition at line 429 of file Variable.h.
References diaghessian, diaghessiandata, gradient, gradientdata, matDiagHessian, matGradient, matRValue, matValue, rows_to_update, rValue, rvaluedata, value, and valuedata.
{ value = v->value; valuedata = v->valuedata; matValue = v->matValue; gradient = v->gradient; matGradient = v->matGradient; gradientdata = v->gradientdata; rows_to_update = v->rows_to_update; rValue = v->rValue; matRValue = v->matRValue; matDiagHessian = v->matDiagHessian; diaghessian = v->diaghessian; diaghessiandata = v->diaghessiandata; rvaluedata = v->rvaluedata; }
like copyTo but also makes value's point to x
Definition at line 1056 of file Variable.cc.
References PLearn::TVec< T >::data(), gradient, gradientdata, j, matGradient, PLearn::TMat< T >::mod_, n, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, PLearn::TVec< T >::storage, PLearn::TMat< T >::storage, PLearn::TMat< T >::width(), and x.
Referenced by makeSharedGradient().
{ if (n!=nelems()) PLERROR("Variable::makeSharedGradient, n(%d) inconsistent with nelems(%d)", n,nelems()); real* v=gradient.data(); gradientdata=x; if (x!=v) for (int j=0;j<n;j++) x[j]=v[j]; gradient.storage = new Storage<real>(n,x); gradient.offset_ = 0; matGradient.storage = gradient.storage; matGradient.offset_ = 0; matGradient.mod_ = matGradient.width(); }
Definition at line 1037 of file Variable.cc.
References PLearn::TVec< T >::data(), gradient, gradientdata, j, matGradient, PLearn::TMat< T >::mod_, n, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, PLearn::TVec< T >::storage, PLearn::TMat< T >::storage, PLearn::TMat< T >::width(), and x.
{ int n=nelems(); if (storage->length()<offset_+n) PLERROR("Variable::makeSharedGradient, storage(%d) too small(%d+%d)", storage->length(),offset_,nelems()); real* v=gradient.data(); real* x=gradientdata=storage->data+offset_; if (x!=v) for (int j=0;j<n;j++) x[j]=v[j]; gradient.storage = storage; gradient.offset_ = offset_; matGradient.storage = storage; matGradient.offset_ = offset_; matGradient.mod_ = matGradient.width(); }
Definition at line 1032 of file Variable.cc.
References makeSharedGradient(), PLearn::TVec< T >::offset_, and PLearn::TVec< T >::storage.
{ makeSharedGradient(v.storage,v.offset_+offset_); }
like copyTo but also makes value's point to x
Definition at line 1097 of file Variable.cc.
References PLearn::TVec< T >::data(), j, matRValue, PLearn::TMat< T >::mod_, n, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, resizeRValue(), rValue, rvaluedata, PLearn::TVec< T >::storage, PLearn::TMat< T >::storage, PLearn::TMat< T >::width(), and x.
Referenced by makeSharedRValue().
{ if (n!=nelems()) PLERROR("Variable::makeSharedRValue, n(%d) inconsistent with nelems(%d)", n,nelems()); resizeRValue(); real* v=rValue.data(); rvaluedata=x; if (x!=v) for (int j=0;j<n;j++) x[j]=v[j]; rValue.storage = new Storage<real>(n,x); rValue.offset_ = 0; matRValue.storage = rValue.storage; matRValue.offset_ = 0; matRValue.mod_ = matRValue.width(); }
Definition at line 1077 of file Variable.cc.
References PLearn::TVec< T >::data(), j, matRValue, PLearn::TMat< T >::mod_, n, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, resizeRValue(), rValue, rvaluedata, PLearn::TVec< T >::storage, PLearn::TMat< T >::storage, PLearn::TMat< T >::width(), and x.
{ resizeRValue(); int n=nelems(); if (storage->length()<offset_+n) PLERROR("Variable::makeSharedRValue, storage(%d) too small(%d+%d)", storage->length(),offset_,nelems()); real* v=rValue.data(); real* x=rvaluedata=storage->data+offset_; if (x!=v) for (int j=0;j<n;j++) x[j]=v[j]; rValue.storage = storage; rValue.offset_ = offset_; matRValue.storage = storage; matRValue.offset_ = offset_; matRValue.mod_ = matRValue.width(); }
Definition at line 1117 of file Variable.cc.
References makeSharedRValue(), PLearn::TVec< T >::offset_, and PLearn::TVec< T >::storage.
{ makeSharedRValue(v.storage,v.offset_+offset_); }
Definition at line 1072 of file Variable.cc.
References makeSharedValue(), PLearn::TVec< T >::offset_, and PLearn::TVec< T >::storage.
{ makeSharedValue(v.storage,v.offset_+offset_); }
like copyTo but also makes value's point to x
Definition at line 998 of file Variable.cc.
References PLearn::TVec< T >::data(), j, matValue, PLearn::TMat< T >::mod_, n, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, PLearn::TVec< T >::storage, PLearn::TMat< T >::storage, value, valuedata, PLearn::TMat< T >::width(), and x.
Referenced by makeSharedValue().
{ if (n!=nelems()) PLERROR("Variable::makeSharedValue, n(%d) inconsistent with nelems(%d)", n,nelems()); real* v=value.data(); valuedata=x; if (x!=v) for (int j=0;j<n;j++) x[j]=v[j]; value.storage = new Storage<real>(n,x); value.offset_ = 0; matValue.storage = value.storage; matValue.offset_ = 0; matValue.mod_ = matValue.width(); }
make value and matValue point into this storage
Definition at line 1014 of file Variable.cc.
References PLearn::TVec< T >::data(), j, matValue, PLearn::TMat< T >::mod_, n, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, PLearn::TVec< T >::storage, PLearn::TMat< T >::storage, value, valuedata, PLearn::TMat< T >::width(), and x.
{ int n=nelems(); if (storage->length()<offset_+n) PLERROR("Variable::makeSharedValue, storage(%d) too small(%d+%d)", storage->length(),offset_,nelems()); real* v=value.data(); real* x=valuedata=storage->data+offset_; if (x!=v) for (int j=0;j<n;j++) x[j]=v[j]; value.storage = storage; value.offset_ = offset_; matValue.storage = storage; matValue.offset_ = offset_; matValue.mod_ = matValue.width(); }
virtual bool PLearn::Variable::markPath | ( | ) | [pure virtual] |
Sets the marked flag of all the sVariable that are to be in the fprop path.
The input sVariable that are of interest are to be marked first. Then markPath is to be called from the output Variable of interest
Implemented in PLearn::BinaryVariable, PLearn::NaryVariable, PLearn::ObjectOptionVariable, PLearn::SourceVariable, and PLearn::UnaryVariable.
Using the box constraints on the values, return the maximum allowable step_size in the given direction i.e.,.
argmax_{step_size} {new = value + step_size * direction, new in box}
Definition at line 962 of file Variable.cc.
References PLearn::TVec< T >::data(), i, max_value, min_value, nelems(), PLERROR, and valuedata.
{ real max_step_size=FLT_MAX; if(min_value>-FLT_MAX || max_value<FLT_MAX) // constrained update { real* dir = direction.data(); for(int i=0; i<nelems(); i++) { real v = valuedata[i]; if (v<min_value || v>max_value) PLERROR("Variable::maxUpdate:current value %f already out of bounds (%f,%f)!", v,min_value,max_value); if (dir[i]>0) // want to increase value: check max_value { if (max_value<FLT_MAX) { real maxstep = (max_value - v)/dir[i]; if (maxstep < max_step_size) max_step_size = maxstep; } } else if (dir[i]<0) // want to decrease value: check min_value { if (min_value > -FLT_MAX) { real maxstep = (min_value - v)/dir[i]; if (maxstep < max_step_size) max_step_size = maxstep; } } } } // else unconstrained return max_step_size; }
bool PLearn::Variable::nameIsSet | ( | ) | [inline] |
Definition at line 244 of file Variable.h.
{ return varname.size()>0; }
int PLearn::Variable::nelems | ( | ) | const [inline] |
Definition at line 169 of file Variable.h.
Referenced by PLearn::SquareVariable::bbprop(), PLearn::TanhVariable::bbprop(), PLearn::SigmoidVariable::bbprop(), PLearn::MinusScalarVariable::bbprop(), PLearn::MinusVariable::bbprop(), PLearn::SubMatVariable::bbprop(), PLearn::NegateElementsVariable::bbprop(), PLearn::PlusVariable::bbprop(), PLearn::PlusScalarVariable::bbprop(), PLearn::PlusScalarVariable::bprop(), PLearn::SoftSlopeIntegralVariable::bprop(), PLearn::AbsVariable::bprop(), PLearn::ExpVariable::bprop(), PLearn::MinusScalarVariable::bprop(), PLearn::ReshapeVariable::bprop(), PLearn::TimesScalarVariable::bprop(), PLearn::DivVariable::bprop(), PLearn::InterValuesVariable::bprop(), PLearn::SoftplusVariable::bprop(), PLearn::SubMatTransposeVariable::bprop(), PLearn::DuplicateScalarVariable::bprop(), PLearn::HardSlopeVariable::bprop(), PLearn::TanhVariable::bprop(), PLearn::SoftmaxVariable::bprop(), PLearn::VarArrayElementVariable::bprop(), PLearn::ErfVariable::bprop(), PLearn::IfThenElseVariable::bprop(), PLearn::PlusManyVariable::bprop(), PLearn::PowVariableVariable::bprop(), PLearn::DilogarithmVariable::bprop(), PLearn::SoftSlopeVariable::bprop(), PLearn::SubMatVariable::bprop(), PLearn::CutAboveThresholdVariable::bprop(), PLearn::CutBelowThresholdVariable::bprop(), PLearn::TimesVariable::bprop(), PLearn::PowVariable::bprop(), PLearn::InvertElementsVariable::bprop(), PLearn::LogVariable::bprop(), PLearn::PlusVariable::bprop(), PLearn::SoftmaxLossVariable::bprop(), PLearn::PLogPVariable::bprop(), PLearn::PlusConstantVariable::bprop(), PLearn::SigmoidVariable::bprop(), PLearn::TimesConstantVariable::bprop(), PLearn::TransposeVariable::bprop(), PLearn::IdentityVariable::bprop(), PLearn::LogSoftmaxVariable::bprop(), PLearn::SquareRootVariable::bprop(), PLearn::MinusVariable::bprop(), PLearn::NegateElementsVariable::bprop(), PLearn::SquareVariable::bprop(), PLearn::TimesConstantScalarVariable2::bprop(), PLearn::LogAddVariable::bprop(), PLearn::UnaryHardSlopeVariable::bprop(), PLearn::ExtendedVariable::build_(), PLearn::DuplicateScalarVariable::fprop(), PLearn::HardSlopeVariable::fprop(), PLearn::PLogPVariable::fprop(), PLearn::MultinomialSampleVariable::fprop(), PLearn::SigmoidVariable::fprop(), PLearn::TanhVariable::fprop(), PLearn::TimesConstantVariable::fprop(), PLearn::TransposeVariable::fprop(), PLearn::MinusVariable::fprop(), PLearn::TimesConstantScalarVariable2::fprop(), PLearn::OneHotVariable::fprop(), PLearn::DilogarithmVariable::fprop(), PLearn::EqualVariable::fprop(), PLearn::UniformSampleVariable::fprop(), PLearn::AbsVariable::fprop(), PLearn::CutAboveThresholdVariable::fprop(), PLearn::ReshapeVariable::fprop(), PLearn::SignVariable::fprop(), PLearn::DivVariable::fprop(), PLearn::IsLargerVariable::fprop(), PLearn::BernoulliSampleVariable::fprop(), PLearn::InterValuesVariable::fprop(), PLearn::IsMissingVariable::fprop(), PLearn::PowVariable::fprop(), PLearn::EqualConstantVariable::fprop(), PLearn::LogVariable::fprop(), PLearn::PlusVariable::fprop(), PLearn::SoftmaxLossVariable::fprop(), PLearn::PlusConstantVariable::fprop(), PLearn::VarArrayElementVariable::fprop(), PLearn::ErfVariable::fprop(), PLearn::IdentityVariable::fprop(), PLearn::IsSmallerVariable::fprop(), PLearn::SquareRootVariable::fprop(), PLearn::IfThenElseVariable::fprop(), PLearn::NegateElementsVariable::fprop(), PLearn::PlusManyVariable::fprop(), PLearn::PowVariableVariable::fprop(), PLearn::SquareVariable::fprop(), PLearn::ScoreLayerVariable::fprop(), PLearn::SoftSlopeVariable::fprop(), PLearn::SubMatVariable::fprop(), PLearn::UnaryHardSlopeVariable::fprop(), PLearn::CutBelowThresholdVariable::fprop(), PLearn::PlusScalarVariable::fprop(), PLearn::SoftSlopeIntegralVariable::fprop(), PLearn::ExpVariable::fprop(), PLearn::MinusScalarVariable::fprop(), PLearn::TimesScalarVariable::fprop(), PLearn::TimesVariable::fprop(), PLearn::EqualScalarVariable::fprop(), PLearn::UnequalConstantVariable::fprop(), PLearn::InvertElementsVariable::fprop(), PLearn::SoftplusVariable::fprop(), PLearn::SubMatTransposeVariable::fprop(), makeSharedGradient(), makeSharedRValue(), makeSharedValue(), maxUpdate(), PLearn::MatrixSumOfVariable::printInfo(), PLearn::SumOfVariable::printInfo(), PLearn::SubMatVariable::rfprop(), PLearn::SoftmaxLossVariable::rfprop(), PLearn::PlusScalarVariable::rfprop(), PLearn::LogVariable::rfprop(), PLearn::MinusScalarVariable::rfprop(), PLearn::IfThenElseVariable::rfprop(), PLearn::SigmoidVariable::rfprop(), PLearn::TimesConstantVariable::rfprop(), PLearn::TimesScalarVariable::rfprop(), PLearn::NegateElementsVariable::rfprop(), PLearn::SubMatTransposeVariable::rfprop(), PLearn::AbsVariable::rfprop(), PLearn::InvertElementsVariable::rfprop(), PLearn::DivVariable::rfprop(), PLearn::TimesConstantScalarVariable2::rfprop(), PLearn::ExpVariable::rfprop(), PLearn::PlusConstantVariable::rfprop(), PLearn::SquareVariable::rfprop(), PLearn::TanhVariable::rfprop(), PLearn::ScoreLayerVariable::setScalingCoefficient(), update(), and updateAndClear().
{ return size(); }
void PLearn::Variable::oldread | ( | istream & | in | ) | [virtual] |
Reimplemented from PLearn::Object.
Definition at line 526 of file Variable.cc.
References PLearn::Object::read(), and value.
{ PLearn::read(in, value); }
virtual VarArray PLearn::Variable::parents | ( | ) | [pure virtual] |
returns all the direct parents of this Var that are not marked (the call doesn't change any mark)
Implemented in PLearn::BinaryVariable, PLearn::NaryVariable, PLearn::ObjectOptionVariable, PLearn::SourceVariable, and PLearn::UnaryVariable.
virtual void PLearn::Variable::printInfo | ( | bool | print_gradient = false | ) | [pure virtual] |
Implemented in PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::MatrixSumOfVariable, PLearn::NaryVariable, PLearn::ObjectOptionVariable, PLearn::SourceVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::UnaryVariable, PLearn::UnfoldedFuncVariable, and PLearn::UnfoldedSumOfVariable.
void PLearn::Variable::printInfos | ( | bool | print_gradient = false | ) | [virtual] |
Definition at line 560 of file Variable.cc.
References ancestors(), PLearn::VarArray::printInfo(), and unmarkAncestors().
{ VarArray ancetres = ancestors(); unmarkAncestors(); ancetres.printInfo(print_gradient); }
virtual VarArray PLearn::Variable::random_sources | ( | ) | [pure virtual] |
return ancestors which compute a non-deterministic function of their parents
Implemented in PLearn::SourceSampleVariable, PLearn::UnarySampleVariable, PLearn::BinarySampleVariable, PLearn::BinaryVariable, PLearn::NaryVariable, PLearn::ObjectOptionVariable, PLearn::SourceVariable, and PLearn::UnaryVariable.
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 in PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::NoBpropVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 341 of file Variable.cc.
References length(), and width().
Referenced by build_(), and sizeprop().
resizes the matValue and matGradient fields of this variable (and updates the value, gradient, valuedata and gradientdata fields accordingly)
Definition at line 347 of file Variable.cc.
References PLearn::TVec< T >::data(), PLearn::TVec< T >::getStorage(), gradient, gradientdata, matGradient, matValue, PLearn::TMat< T >::resize(), PLearn::TMat< T >::setMod(), PLearn::TMat< T >::toVec(), value, and valuedata.
Referenced by build_(), PLearn::SourceVariable::build_(), PLearn::ObjectOptionVariable::build_(), PLearn::LocalizedFeaturesLayerVariable::build_(), PLearn::FNetLayerVariable::build_(), and sizeprop().
{ value = Vec(); // Force mod == width so that the call to 'toVec()' below does not crash. matValue.setMod(w); matValue.resize(l,w); value = matValue.toVec(); if(value.getStorage()) valuedata = value.data(); else valuedata = 0; gradient = Vec(); // Same as above. matGradient.setMod(w); matGradient.resize(l,w); gradient = matGradient.toVec(); if (gradient.getStorage()) gradientdata = gradient.data(); else gradientdata = 0; }
void PLearn::Variable::resizeDiagHessian | ( | ) | [virtual] |
resize the DiagHessian field
Definition at line 1125 of file Variable.cc.
References PLearn::TVec< T >::data(), diaghessian, diaghessiandata, length(), matDiagHessian, PLearn::TMat< T >::resize(), PLearn::TMat< T >::toVec(), and width().
Referenced by clearDiagHessian().
{ matDiagHessian.resize(length(),width()); diaghessian = matDiagHessian.toVec(); diaghessiandata = diaghessian.data(); }
void PLearn::Variable::resizeRValue | ( | ) | [virtual] |
Reimplemented in PLearn::BinaryVariable, PLearn::NaryVariable, and PLearn::UnaryVariable.
Definition at line 1135 of file Variable.cc.
References PLearn::TVec< T >::data(), length(), matRValue, PLearn::TMat< T >::resize(), rValue, rvaluedata, PLearn::TMat< T >::toVec(), and width().
Referenced by makeSharedRValue(), PLearn::UnaryVariable::resizeRValue(), PLearn::BinaryVariable::resizeRValue(), and PLearn::NaryVariable::resizeRValue().
{ if (!rvaluedata) { matRValue.resize(length(),width()); rValue = matRValue.toVec(); rvaluedata = rValue.data(); } }
void PLearn::Variable::rfprop | ( | ) | [virtual] |
Reimplemented in PLearn::AbsVariable, PLearn::CCCostVariable, PLearn::ConcatRowsVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::ElementAtPositionVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::NonDiagVariable, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::LogVariable, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MinusScalarVariable, PLearn::NegateElementsVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PotentialsVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ReIndexedTargetVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SourceVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SumOfVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::VarElementVariable, and PLearn::VarRowVariable.
Definition at line 512 of file Variable.cc.
References PLearn::Object::classname(), and PLERROR.
Definition at line 265 of file Variable.h.
References PLearn::subMat(), and PLearn::transpose().
Referenced by PLearn::HeterogenuousAffineTransformWeightPenalty::bprop(), PLearn::HeterogenuousAffineTransformVariable::bprop(), PLearn::GaussianProcessNLLVariable::bprop(), PLearn::LocalizedFeaturesLayerVariable::computeSubsets(), PLearn::HeterogenuousAffineTransformWeightPenalty::fprop(), PLearn::HeterogenuousAffineTransformVariable::fprop(), update(), updateAndClear(), and updateWithWeightDecay().
Definition at line 272 of file Variable.h.
void PLearn::Variable::setDontBpropHere | ( | bool | val | ) | [inline] |
Definition at line 268 of file Variable.h.
{ dont_bprop_here = val; }
void PLearn::Variable::setKeepPositive | ( | ) | [inline] |
Definition at line 269 of file Variable.h.
{ min_value = 0; }
void PLearn::Variable::setMark | ( | ) | [inline] |
Definition at line 274 of file Variable.h.
Referenced by PLearn::ObjectOptionVariable::ancestors(), PLearn::SourceVariable::ancestors(), PLearn::SourceVariable::random_sources(), PLearn::ObjectOptionVariable::random_sources(), PLearn::ObjectOptionVariable::sources(), and PLearn::SourceVariable::sources().
{ marked = true; }
void PLearn::Variable::setMaxValue | ( | real | maxv = FLT_MAX | ) | [inline] |
Definition at line 271 of file Variable.h.
{ max_value = maxv; }
void PLearn::Variable::setMinValue | ( | real | minv = -FLT_MAX | ) | [inline] |
Definition at line 270 of file Variable.h.
Referenced by declareMethods().
{ min_value = minv; }
void PLearn::Variable::setName | ( | const string & | the_name | ) |
call this to set a name for this variable
Definition at line 515 of file Variable.cc.
References varname.
Referenced by PLearn::DeepFeatureExtractorNNet::build_(), and PLearn::Var::Var().
{ varname = the_name; }
void PLearn::Variable::setParents | ( | const VarArray & | parents | ) | [virtual] |
set this Variable's parents. To use with default constructor.
Reimplemented in PLearn::BinaryVariable, PLearn::NaryVariable, PLearn::ObjectOptionVariable, PLearn::SourceVariable, and PLearn::UnaryVariable.
Definition at line 383 of file Variable.cc.
References PLearn::Object::classname(), and PLERROR.
{ PLERROR("In Variable::setParents setParents() function not implemented for %s", classname().c_str()); }
Replace with 'submat' the sub-matrix of the value starting at row 'istart' and column 'jstart'.
Definition at line 1148 of file Variable.cc.
References PLearn::TMat< T >::length(), matValue, PLearn::TMat< T >::subMat(), and PLearn::TMat< T >::width().
Referenced by declareMethods().
{ matValue.subMat(istart, jstart, submat.length(), submat.width()) << submat; }
int PLearn::Variable::size | ( | ) | const [inline] |
Definition at line 168 of file Variable.h.
Referenced by PLearn::HeterogenuousAffineTransformVariable::bprop(), PLearn::ObjectOptionVariable::build_(), PLearn::NegLogPoissonVariable::build_(), PLearn::HeterogenuousAffineTransformWeightPenalty::build_(), PLearn::HeterogenuousAffineTransformVariable::build_(), PLearn::FNetLayerVariable::build_(), PLearn::ConfRatedAdaboostCostVariable::build_(), PLearn::SumOfVariable::fbprop(), PLearn::SumOfVariable::fprop(), PLearn::SemiSupervisedProbClassCostVariable::fprop(), PLearn::LiftOutputVariable::fprop(), and PLearn::HeterogenuousAffineTransformVariable::fprop().
{ return matValue.size(); } // length*width
void PLearn::Variable::sizefprop | ( | ) | [inline] |
compute dC/dinput given dC/doutput
Calls sizeprop, then fprop
Definition at line 215 of file Variable.h.
void PLearn::Variable::sizeprop | ( | ) |
resizes value and gradient fields according to size given by recomputeSize(...) This corresponds to "propagating" the size from its parent's size, much as fprop propagates the values
Definition at line 373 of file Variable.cc.
References recomputeSize(), resize(), and w.
Referenced by PLearn::RunICPVariable::addTemplate(), PLearn::UnaryVariable::setParents(), PLearn::BinaryVariable::setParents(), and PLearn::NaryVariable::setParents().
{ int l,w; recomputeSize(l,w); resize(l,w); }
virtual VarArray PLearn::Variable::sources | ( | ) | [pure virtual] |
if not marked, find all constant sources that influence this Variable.
A constant source is normally a SourceVariable.
Implemented in PLearn::BinaryVariable, PLearn::NaryVariable, PLearn::ObjectOptionVariable, PLearn::SourceVariable, and PLearn::UnaryVariable.
Referenced by fprop_from_all_sources(), and verifyGradient().
Definition at line 544 of file Variable.cc.
Referenced by PLearn::ScoreLayerVariable::build_(), and subVec().
{ if(do_transpose) return new SubMatTransposeVariable(this, i, j, sublength, subwidth); else return new SubMatVariable(this, i, j, sublength, subwidth); }
Definition at line 533 of file Variable.cc.
References isColumnVec(), isRowVec(), PLERROR, subMat(), and Var.
{ if(isColumnVec()) return subMat(start,0,len,1,transpose); else if(isRowVec()) return subMat(0,start,1,len,transpose); PLERROR("In Variable::subVec variable is not a vec (single column or single row)"); return Var(); }
void PLearn::Variable::symbolicBprop | ( | ) | [virtual] |
compute a piece of new Var graph that represents the symbolic derivative of this Var
Reimplemented in PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::ArgmaxVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::CCCostVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::NonDiagVariable, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::HardSlopeVariable, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::NegateElementsVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnequalConstantVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, and PLearn::WeightedLogGaussian.
Definition at line 509 of file Variable.cc.
References PLearn::Object::classname(), and PLERROR.
virtual void PLearn::Variable::unmarkAncestors | ( | ) | [pure virtual] |
undo any marking done by a call to sources() or ancestors()
Implemented in PLearn::BinaryVariable, PLearn::NaryVariable, PLearn::ObjectOptionVariable, PLearn::SourceVariable, and PLearn::UnaryVariable.
Referenced by fprop_from_all_sources(), printInfos(), and verifyGradient().
set value = new_value
projected down in each direction independently in the subspace in which the box constraints are satisfied. return true if box constraints have been hit with the update
Reimplemented in PLearn::ConstrainedSourceVariable.
Definition at line 925 of file Variable.cc.
References allows_partial_update, PLearn::TVec< T >::data(), i, max_value, min_value, nelems(), PLWARNING, and valuedata.
{ if(allows_partial_update) PLWARNING("Warning in Variable::update(Vec): will update every elements of the Variable"); bool hit=false; if(min_value>-FLT_MAX || max_value<FLT_MAX) // constrained update { real* new_v = new_value.data(); for(int i=0; i<nelems(); i++) { valuedata[i] = new_v[i]; if(valuedata[i]<min_value) { valuedata[i]=min_value; hit = true; } else if(valuedata[i]>max_value) { valuedata[i]=max_value; hit = true; } } } else // unconstrained update { real* new_v = new_value.data(); for(int i=0; i<nelems(); i++) valuedata[i] = new_v[i]; } return hit; }
set value = value + step_size * gradient
with step_size possibly scaled down s.t. box constraints are satisfied return true if box constraints have been hit with the update
Reimplemented in PLearn::ConstrainedSourceVariable, and PLearn::ObjectOptionVariable.
Definition at line 661 of file Variable.cc.
References allows_partial_update, gradient_status, i, length(), PLearn::TVec< T >::length(), matGradient, matValue, max_value, min_value, PLearn::TVec< T >::resize(), row(), rows_to_update, and width().
{ bool hit=false; if(min_value>-FLT_MAX || max_value<FLT_MAX) // constrained update { if (allows_partial_update && gradient_status!=2) { if (gradient_status!=0) { for (int r=0;r<rows_to_update.length();r++) { int row = rows_to_update[r]; real* direction = matGradient[row]; real* params = matValue[row]; for(int i=0; i<width(); i++) { params[i] += step_size*direction[i]; if(params[i]<min_value) { params[i]=min_value; hit = true; } else if(params[i]>max_value) { params[i]=max_value; hit = true; } if (clear) direction[i]=0; } } if (clear) { rows_to_update.resize(0); gradient_status=0; } } } else for (int row=0;row<length();row++) { real* direction = matGradient[row]; real* params = matValue[row]; for(int i=0; i<width(); i++) { params[i] += step_size*direction[i]; if(params[i]<min_value) { params[i]=min_value; hit = true; } else if(params[i]>max_value) { params[i]=max_value; hit = true; } if (clear) direction[i]=0; } } } else // unconstrained update { if (allows_partial_update && gradient_status!=2) { if (gradient_status!=0) { for (int r=0;r<rows_to_update.length();r++) { int row = rows_to_update[r]; real* direction = matGradient[row]; real* params = matValue[row]; for(int i=0; i<width(); i++) { params[i] += step_size*direction[i]; if (clear) direction[i] = 0; } } if (clear) { rows_to_update.resize(0); gradient_status=0; } } } else for (int row=0;row<length();row++) { real* direction = matGradient[row]; real* params = matValue[row]; for(int i=0; i<width(); i++) { params[i] += step_size*direction[i]; if (clear) direction[i] = 0; } } } return hit; }
bool PLearn::Variable::update | ( | real | step_size, |
Vec | direction_vec, | ||
real | coeff = 1.0 , |
||
real | b = 0.0 |
||
) | [virtual] |
set value = value + (step_size * coeff + b) * direction
with step_size possibly scaled down s.t. box constraints are satisfied return true if box constraints have been hit with the update If (allows_partial_update) the update is done where necessary. NB: Wrong ?
Reimplemented in PLearn::ConstrainedSourceVariable.
Definition at line 592 of file Variable.cc.
References allows_partial_update, b, PLearn::TVec< T >::data(), i, max_value, min_value, nelems(), PLWARNING, and valuedata.
Referenced by PLearn::ObjectOptionVariable::update().
{ bool hit = false; if(allows_partial_update) PLWARNING("Warning in Variable::update(real,Vec): will update every elements of the Variable"); real full_coeff = step_size * coeff + b; if(min_value>-FLT_MAX || max_value<FLT_MAX) // constrained update { real* direction = direction_vec.data(); for(int i=0; i<nelems(); i++) { valuedata[i] += (full_coeff) * direction[i]; if(valuedata[i]<min_value) { valuedata[i]=min_value; hit = true; } else if(valuedata[i]>max_value) { valuedata[i]=max_value; hit = true; } } } else // unconstrained update { real* direction = direction_vec.data(); for(int i=0; i<nelems(); i++) { valuedata[i] += (full_coeff) * direction[i]; } } return hit; }
bool PLearn::Variable::update | ( | Vec | step_sizes, |
Vec | direction_vec, | ||
real | coeff = 1.0 , |
||
real | b = 0.0 |
||
) | [virtual] |
set value[i] = value[i] + (step_sizes[i]*coeff + b) * direction[i]
with step_size possibly scaled down s.t. box constraints are satisfied return true if box constraints have been hit with the update
Reimplemented in PLearn::ConstrainedSourceVariable.
Definition at line 629 of file Variable.cc.
References allows_partial_update, b, PLearn::TVec< T >::data(), i, max_value, min_value, nelems(), PLWARNING, and valuedata.
{ if(allows_partial_update) PLWARNING("Warning in Variable::update(Vec,Vec): will update every elements of the Variable"); bool hit=false; real* direction = direction_vec.data(); real* step = step_sizes.data(); if(min_value>-FLT_MAX || max_value<FLT_MAX) // constrained update { for(int i=0; i<nelems(); i++) { valuedata[i] += (step[i] * coeff + b) * direction[i]; if(valuedata[i]<min_value) { valuedata[i]=min_value; hit = true; } else if(valuedata[i]>max_value) { valuedata[i]=max_value; hit = true; } } } else // unconstrained update for(int i=0; i<nelems(); i++) valuedata[i] += (step[i] * coeff + b) * direction[i]; return hit; }
void PLearn::Variable::updateAndClear | ( | ) | [virtual] |
Set value += gradient (respecting potential box constraints), and clear the gradient.
Reimplemented in PLearn::ConstrainedSourceVariable, and PLearn::ObjectOptionVariable.
Definition at line 841 of file Variable.cc.
References allows_partial_update, PLearn::TVec< T >::clear(), gradient, gradient_status, gradientdata, i, PLearn::TVec< T >::length(), matGradient, matValue, max_value, min_value, nelems(), PLearn::TVec< T >::resize(), row(), rows_to_update, value, valuedata, and width().
Referenced by PLearn::ObjectOptionVariable::updateAndClear().
{ if (allows_partial_update && gradient_status!=2) { if (gradient_status!=0) { for (int r=0;r<rows_to_update.length();r++) { int row = rows_to_update[r]; real* direction = matGradient[row]; real* params = matValue[row]; for(int i=0; i<width(); i++) { real& param_i = params[i]; param_i += direction[i]; if (param_i < min_value) param_i = min_value; else if (param_i > max_value) param_i = max_value; direction[i] = 0; } } rows_to_update.resize(0); gradient_status=0; } } else { for(int i=0; i<nelems(); i++) { real& value = valuedata[i]; value += gradientdata[i]; if (value < min_value) value = min_value; else if (value > max_value) value = max_value; } gradient.clear(); } }
void PLearn::Variable::updateRow | ( | int | row | ) | [inline] |
says that given row has received gradient (should be updated on next call to update)
Definition at line 376 of file Variable.h.
{ if (gradient_status!=2 && allows_partial_update && !rows_to_update.contains(row)) { rows_to_update.append(row); if (gradient_status==0) gradient_status=1; } }
void PLearn::Variable::updateWithWeightDecay | ( | real | step_size, |
real | weight_decay, | ||
bool | L1, | ||
bool | clear = true |
||
) | [virtual] |
if (L1) value += learning_rate*gradient decrease |value| by learning_rate*weight_decay if it does not make value change sign else // L2 value += learning_rate*(gradient - weight_decay*value) if (clear) gradient=0
Reimplemented in PLearn::ConstrainedSourceVariable, and PLearn::ObjectOptionVariable.
Definition at line 764 of file Variable.cc.
References allows_partial_update, gradient_status, i, length(), PLearn::TVec< T >::length(), matGradient, matValue, PLearn::TVec< T >::resize(), row(), rows_to_update, and width().
Referenced by PLearn::ObjectOptionVariable::updateWithWeightDecay().
{ // we do unconstrained update only here if (allows_partial_update && gradient_status!=2) { if (gradient_status!=0) { for (int r=0;r<rows_to_update.length();r++) { int row = rows_to_update[r]; real* direction = matGradient[row]; real* params = matValue[row]; if (L1) { real delta = fabs(step_size)*weight_decay; for(int i=0; i<width(); i++) { real pi = params[i]; params[i] += step_size*direction[i]; if (pi>delta) params[i] -= delta; else if (pi<-delta) params[i] += delta; else params[i] = 0; if (clear) direction[i] = 0; } } else // L2 for(int i=0; i<width(); i++) { params[i] += step_size*(direction[i] + weight_decay*params[i]); if (clear) direction[i] = 0; } } if (clear) { rows_to_update.resize(0); gradient_status=0; } } } else for (int row=0;row<length();row++) { real* direction = matGradient[row]; real* params = matValue[row]; if (L1) { real delta = fabs(step_size)*weight_decay; for(int i=0; i<width(); i++) { real pi = params[i]; params[i] += step_size*direction[i]; if (pi>delta) params[i] -= delta; else if (pi<-delta) params[i] += delta; if (clear) direction[i] = 0; } } else // L2 for(int i=0; i<width(); i++) { params[i] += step_size*(direction[i] + weight_decay*params[i]); if (clear) direction[i] = 0; } } }
void PLearn::Variable::verifyGradient | ( | real | step = 0.001 | ) | [virtual] |
call verify gradient for the mapping from all the sources to this Variable.
Definition at line 578 of file Variable.cc.
References PLearn::VarArray::nelems(), sources(), unmarkAncestors(), and Var.
{ VarArray inputs = sources(); unmarkAncestors(); Func f(inputs,Var(this)); Vec p(inputs.nelems()); inputs >> p; f->verifyGradient(p,step); }
int PLearn::Variable::width | ( | ) | const [inline] |
Definition at line 167 of file Variable.h.
Referenced by accg(), PLearn::SubMatVariable::bbprop(), PLearn::PlusRowVariable::bbprop(), PLearn::PlusColumnVariable::bbprop(), PLearn::MinusRowVariable::bbprop(), PLearn::MinusColumnVariable::bbprop(), PLearn::TransposeVariable::bprop(), PLearn::TimesRowVariable::bprop(), PLearn::TimesColumnVariable::bprop(), PLearn::SubsampleVariable::bprop(), PLearn::SubMatVariable::bprop(), PLearn::SubMatTransposeVariable::bprop(), PLearn::PlusRowVariable::bprop(), PLearn::PlusColumnVariable::bprop(), PLearn::MinusTransposedColumnVariable::bprop(), PLearn::MinusRowVariable::bprop(), PLearn::MinusColumnVariable::bprop(), PLearn::LogAddVariable::bprop(), PLearn::IndexAtPositionVariable::bprop(), PLearn::ExtractVariable::bprop(), PLearn::ExtendedVariable::bprop(), PLearn::ElementAtPositionVariable::bprop(), PLearn::DuplicateRowVariable::bprop(), PLearn::DuplicateColumnVariable::bprop(), PLearn::ConvolveVariable::bprop(), build_(), PLearn::TransposedDoubleProductVariable::build_(), PLearn::ReshapeVariable::build_(), PLearn::NllSemisphericalGaussianVariable::build_(), PLearn::NllGeneralGaussianVariable::build_(), PLearn::HeterogenuousAffineTransformWeightPenalty::build_(), PLearn::HeterogenuousAffineTransformVariable::build_(), PLearn::FNetLayerVariable::build_(), PLearn::DoubleProductVariable::build_(), PLearn::ConcatRowsVariable::build_(), PLearn::DiagonalNormalSampleVariable::DiagonalNormalSampleVariable(), PLearn::TransposeVariable::fprop(), PLearn::TimesRowVariable::fprop(), PLearn::TimesColumnVariable::fprop(), PLearn::SubMatVariable::fprop(), PLearn::SubMatTransposeVariable::fprop(), PLearn::PlusRowVariable::fprop(), PLearn::PlusColumnVariable::fprop(), PLearn::MultiSampleVariable::fprop(), PLearn::MinusTransposedColumnVariable::fprop(), PLearn::MinusRowVariable::fprop(), PLearn::MinusColumnVariable::fprop(), PLearn::MatrixSoftmaxVariable::fprop(), PLearn::LogAddVariable::fprop(), PLearn::IndexAtPositionVariable::fprop(), PLearn::ExtractVariable::fprop(), PLearn::ExtendedVariable::fprop(), PLearn::ElementAtPositionVariable::fprop(), PLearn::DuplicateRowVariable::fprop(), PLearn::DuplicateColumnVariable::fprop(), recomputeSize(), PLearn::SoftSlopeVariable::recomputeSize(), PLearn::SoftSlopeIntegralVariable::recomputeSize(), PLearn::HeterogenuousAffineTransformVariable::recomputeSize(), PLearn::HardSlopeVariable::recomputeSize(), resizeDiagHessian(), resizeRValue(), PLearn::TimesRowVariable::rfprop(), PLearn::TimesColumnVariable::rfprop(), PLearn::SubMatVariable::rfprop(), PLearn::SubMatTransposeVariable::rfprop(), PLearn::PlusRowVariable::rfprop(), PLearn::PlusColumnVariable::rfprop(), PLearn::ExtendedVariable::rfprop(), PLearn::ElementAtPositionVariable::rfprop(), PLearn::SVDVariable::SVDVariable(), PLearn::SubMatVariable::symbolicBprop(), PLearn::SubMatTransposeVariable::symbolicBprop(), PLearn::PowVariableVariable::symbolicBprop(), PLearn::IfThenElseVariable::symbolicBprop(), PLearn::ConcatRowsVariable::symbolicBprop(), update(), updateAndClear(), and updateWithWeightDecay().
{ return matValue.width(); }
void PLearn::Variable::write | ( | ostream & | out | ) | const [virtual] |
Write the object to a C++ ostream
.
The write method should write a complete description of the object to the given stream, that should be enough to later reconstruct it. (a somewhat human-readable ascii format is usually preferred). The new default version simply calls newwrite(...) which simply writes all the "options" declared in declareOptions, so there is no need to overload write in subclasses. Old classes that still override write should progressively be moved to the new declareOptions/build mechanism.
Reimplemented from PLearn::Object.
Definition at line 529 of file Variable.cc.
References value.
{ PLearn::write(out, value); }
friend class BinaryVariable [friend] |
Definition at line 129 of file Variable.h.
friend class Function [friend] |
Definition at line 126 of file Variable.h.
friend class NaryVariable [friend] |
Definition at line 130 of file Variable.h.
friend class ProductRandomVariable [friend] |
Definition at line 125 of file Variable.h.
friend class RandomVariable [friend] |
Definition at line 124 of file Variable.h.
friend class UnaryVariable [friend] |
Definition at line 128 of file Variable.h.
friend class Var [friend] |
Definition at line 123 of file Variable.h.
Referenced by accg(), PLearn::UnaryVariable::ancestors(), PLearn::SourceVariable::ancestors(), PLearn::ObjectOptionVariable::ancestors(), PLearn::NaryVariable::ancestors(), PLearn::BinaryVariable::ancestors(), PLearn::UnfoldedSumOfVariable::build_(), PLearn::UnfoldedFuncVariable::build_(), PLearn::ScoreLayerVariable::build_(), PLearn::PotentialsVariable::build_(), PLearn::LocalizedFeaturesLayerVariable::build_(), PLearn::FNetLayerVariable::build_(), PLearn::UnaryVariable::buildPath(), PLearn::SourceVariable::buildPath(), PLearn::ObjectOptionVariable::buildPath(), PLearn::NaryVariable::buildPath(), PLearn::BinaryVariable::buildPath(), PLearn::PotentialsVariable::fprop(), fprop_from_all_sources(), PLearn::SourceVariable::sources(), PLearn::ObjectOptionVariable::sources(), subVec(), PLearn::SoftmaxLossVariable::symbolicBprop(), PLearn::PowVariableVariable::symbolicBprop(), PLearn::ExpVariable::symbolicBprop(), and verifyGradient().
Reimplemented from PLearn::Object.
Reimplemented in PLearn::AbsVariable, PLearn::AffineTransformVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminOfVariable, PLearn::ArgminVariable, PLearn::BiasWeightAffineTransformVariable, PLearn::BinaryClassificationLossVariable, PLearn::BinaryVariable, PLearn::CCCostVariable, PLearn::ClassificationLossVariable, PLearn::ColumnIndexVariable, PLearn::ColumnSumVariable, PLearn::ConcatColumnsVariable, PLearn::ConcatOfVariable, PLearn::ConcatRowsVariable, PLearn::ConfRatedAdaboostCostVariable, PLearn::ConvolveVariable, PLearn::CrossEntropyVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DiagonalizedFactorsProductVariable, PLearn::DilogarithmVariable, PLearn::DivVariable, PLearn::DotProductVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::ElementAtPositionVariable, PLearn::EqualConstantVariable, PLearn::EqualScalarVariable, PLearn::EqualVariable, PLearn::ErfVariable, PLearn::AdditiveGaussianNoiseVariable, PLearn::BernoulliSampleVariable, PLearn::ConstrainedSourceVariable, PLearn::ConstrainVariable, PLearn::Cov2CorrVariable, PLearn::DiagVariable, PLearn::DoubleProductVariable, PLearn::LinearCombinationOfScalarVariables, PLearn::LogSoftSoftMaxVariable, PLearn::MultiMaxVariable, PLearn::MultiSampleVariable, PLearn::NonDiagVariable, PLearn::ProbabilityPairsInverseVariable, PLearn::ProbabilityPairsVariable, PLearn::RandomForcedValuesVariable, PLearn::SaltPepperNoiseVariable, PLearn::SoftSoftMaxVariable, PLearn::SumEntropyOfBernoullis, PLearn::SumEntropyOfCategoricals, PLearn::SumVarianceOfLinearTransformedBernoullis, PLearn::SumVarianceOfLinearTransformedCategoricals, PLearn::TimesConstantScalarVariable2, PLearn::TraceVariable, PLearn::TransposedDoubleProductVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::ExtractVariable, PLearn::FNetLayerVariable, PLearn::GaussianProcessNLLVariable, PLearn::GradientAdaboostCostVariable, PLearn::HardSlopeVariable, PLearn::HeterogenuousAffineTransformVariable, PLearn::HeterogenuousAffineTransformWeightPenalty, PLearn::IdentityVariable, PLearn::IfThenElseVariable, PLearn::IndexAtPositionVariable, PLearn::InsertZerosVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsLargerVariable, PLearn::IsMissingVariable, PLearn::IsSmallerVariable, PLearn::LeftPseudoInverseVariable, PLearn::LiftOutputVariable, PLearn::LocalizedFeaturesLayerVariable, PLearn::LogAddVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixAffineTransformFeedbackVariable, PLearn::MatrixAffineTransformVariable, PLearn::MatrixElementsVariable, PLearn::MatrixInverseVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::MatrixSoftmaxLossVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatrixSumOfVariable, PLearn::MatRowVariable, PLearn::Max2Variable, PLearn::MaxVariable, PLearn::Min2Variable, PLearn::MiniBatchClassificationLossVariable, PLearn::MinusColumnVariable, PLearn::MinusRowVariable, PLearn::MinusScalarVariable, PLearn::MinusTransposedColumnVariable, PLearn::MinusVariable, PLearn::MinVariable, PLearn::MulticlassLossVariable, PLearn::NaryVariable, PLearn::NegateElementsVariable, PLearn::NegCrossEntropySigmoidVariable, PLearn::NegLogPoissonVariable, PLearn::NllGeneralGaussianVariable, PLearn::NllSemisphericalGaussianVariable, PLearn::NoBpropVariable, PLearn::ObjectOptionVariable, PLearn::OneHotSquaredLoss, PLearn::OneHotVariable, PLearn::OutputVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusColumnVariable, PLearn::PlusConstantVariable, PLearn::PlusManyVariable, PLearn::PlusRowVariable, PLearn::PlusScalarVariable, PLearn::PlusVariable, PLearn::PotentialsVariable, PLearn::PowVariable, PLearn::PowVariableVariable, PLearn::ProductTransposeVariable, PLearn::ProductVariable, PLearn::ProjectionErrorVariable, PLearn::ReIndexedTargetVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowAtPositionVariable, PLearn::RowOfVariable, PLearn::RowSumSquareVariable, PLearn::RowSumVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxLossVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SourceVariable, PLearn::SparseIncrementalAffineTransformVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::SVDVariable, PLearn::TanhVariable, PLearn::ThresholdBpropVariable, PLearn::TimesColumnVariable, PLearn::TimesConstantVariable, PLearn::TimesRowVariable, PLearn::TimesScalarVariable, PLearn::TimesVariable, PLearn::TransposeProductVariable, PLearn::TransposeVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnaryVariable, PLearn::UnequalConstantVariable, PLearn::UnfoldedFuncVariable, PLearn::UnfoldedSumOfVariable, PLearn::VarArrayElementVariable, PLearn::VarColumnsVariable, PLearn::VarElementVariable, PLearn::VarRowsVariable, PLearn::VarRowVariable, PLearn::VecElementVariable, PLearn::WeightedSumSquareVariable, PLearn::NLLNeighborhoodWeightsVariable, PLearn::RunICPVariable, PLearn::ScoreLayerVariable, and PLearn::WeightedLogGaussian.
Definition at line 206 of file Variable.h.
bool PLearn::Variable::allows_partial_update [protected] |
only if this is true then the following two fields are used.
Definition at line 140 of file Variable.h.
Referenced by update(), updateAndClear(), and updateWithWeightDecay().
optionally computed second derivative (see bbprop methods)
Definition at line 157 of file Variable.h.
Referenced by clearDiagHessian(), makePointTo(), and resizeDiagHessian().
set to diaghessian.data() or NULL if no diaghessian
Definition at line 158 of file Variable.h.
Referenced by PLearn::PlusColumnVariable::bbprop(), PLearn::SquareVariable::bbprop(), PLearn::DotProductVariable::bbprop(), PLearn::TanhVariable::bbprop(), PLearn::PlusRowVariable::bbprop(), PLearn::MinusRowVariable::bbprop(), PLearn::MinusScalarVariable::bbprop(), PLearn::MinusColumnVariable::bbprop(), PLearn::MinusVariable::bbprop(), PLearn::SubMatVariable::bbprop(), PLearn::NegateElementsVariable::bbprop(), PLearn::PlusVariable::bbprop(), PLearn::PlusScalarVariable::bbprop(), makePointTo(), and resizeDiagHessian().
if true, children are encouraged not to bprop gradient in this var (saves computation time)
Definition at line 160 of file Variable.h.
symbolic gradient used for symbolicBprop
Definition at line 156 of file Variable.h.
Referenced by accg(), PLearn::TraceVariable::bprop(), PLearn::ConstrainVariable::bprop(), makeDeepCopyFromShallowCopy(), PLearn::WeightedSumSquareVariable::symbolicBprop(), PLearn::VarRowVariable::symbolicBprop(), PLearn::VarElementVariable::symbolicBprop(), PLearn::VarArrayElementVariable::symbolicBprop(), PLearn::TransposeProductVariable::symbolicBprop(), PLearn::TimesVariable::symbolicBprop(), PLearn::TimesScalarVariable::symbolicBprop(), PLearn::TimesRowVariable::symbolicBprop(), PLearn::TimesConstantVariable::symbolicBprop(), PLearn::TimesConstantScalarVariable2::symbolicBprop(), PLearn::TimesColumnVariable::symbolicBprop(), PLearn::TanhVariable::symbolicBprop(), PLearn::SumVariable::symbolicBprop(), PLearn::SumSquareVariable::symbolicBprop(), PLearn::SumAbsVariable::symbolicBprop(), PLearn::SubMatVariable::symbolicBprop(), PLearn::SubMatTransposeVariable::symbolicBprop(), PLearn::SquareVariable::symbolicBprop(), PLearn::SoftplusVariable::symbolicBprop(), PLearn::SoftmaxLossVariable::symbolicBprop(), PLearn::SigmoidVariable::symbolicBprop(), PLearn::RowSumVariable::symbolicBprop(), PLearn::RowAtPositionVariable::symbolicBprop(), PLearn::ReshapeVariable::symbolicBprop(), PLearn::ProductVariable::symbolicBprop(), PLearn::ProductTransposeVariable::symbolicBprop(), PLearn::PowVariableVariable::symbolicBprop(), PLearn::PowVariable::symbolicBprop(), PLearn::PlusVariable::symbolicBprop(), PLearn::PlusScalarVariable::symbolicBprop(), PLearn::PlusRowVariable::symbolicBprop(), PLearn::PlusConstantVariable::symbolicBprop(), PLearn::PlusColumnVariable::symbolicBprop(), PLearn::PLogPVariable::symbolicBprop(), PLearn::OneHotSquaredLoss::symbolicBprop(), PLearn::NegateElementsVariable::symbolicBprop(), PLearn::MinVariable::symbolicBprop(), PLearn::MinusVariable::symbolicBprop(), PLearn::MinusTransposedColumnVariable::symbolicBprop(), PLearn::MinusScalarVariable::symbolicBprop(), PLearn::MinusRowVariable::symbolicBprop(), PLearn::MinusColumnVariable::symbolicBprop(), PLearn::Min2Variable::symbolicBprop(), PLearn::MaxVariable::symbolicBprop(), PLearn::Max2Variable::symbolicBprop(), PLearn::LogVariable::symbolicBprop(), PLearn::LogSumVariable::symbolicBprop(), PLearn::LogAddVariable::symbolicBprop(), PLearn::InvertElementsVariable::symbolicBprop(), PLearn::InterValuesVariable::symbolicBprop(), PLearn::IndexAtPositionVariable::symbolicBprop(), PLearn::IfThenElseVariable::symbolicBprop(), PLearn::ExtendedVariable::symbolicBprop(), PLearn::ExpVariable::symbolicBprop(), PLearn::ErfVariable::symbolicBprop(), PLearn::ElementAtPositionVariable::symbolicBprop(), PLearn::DuplicateScalarVariable::symbolicBprop(), PLearn::DuplicateRowVariable::symbolicBprop(), PLearn::DuplicateColumnVariable::symbolicBprop(), PLearn::DotProductVariable::symbolicBprop(), PLearn::DivVariable::symbolicBprop(), PLearn::CutBelowThresholdVariable::symbolicBprop(), PLearn::CutAboveThresholdVariable::symbolicBprop(), PLearn::ConcatRowsVariable::symbolicBprop(), PLearn::ConcatColumnsVariable::symbolicBprop(), PLearn::ColumnSumVariable::symbolicBprop(), PLearn::ColumnIndexVariable::symbolicBprop(), and PLearn::AbsVariable::symbolicBprop().
Definition at line 146 of file Variable.h.
Referenced by PLearn::SparseIncrementalAffineTransformVariable::bprop(), PLearn::SumVarianceOfLinearTransformedBernoullis::bprop(), PLearn::GaussianProcessNLLVariable::bprop(), PLearn::PotentialsVariable::bprop(), PLearn::DiagVariable::bprop(), PLearn::AffineTransformVariable::bprop(), PLearn::HeterogenuousAffineTransformVariable::bprop(), PLearn::ProjectionErrorVariable::bprop(), PLearn::VarRowVariable::bprop(), PLearn::IfThenElseVariable::bprop(), PLearn::NllGeneralGaussianVariable::bprop(), PLearn::RandomForcedValuesVariable::bprop(), PLearn::BiasWeightAffineTransformVariable::bprop(), PLearn::Min2Variable::bprop(), PLearn::UnfoldedSumOfVariable::bprop(), PLearn::NonDiagVariable::bprop(), PLearn::Max2Variable::bprop(), PLearn::SaltPepperNoiseVariable::bprop(), PLearn::NegLogPoissonVariable::bprop(), PLearn::NllSemisphericalGaussianVariable::bprop(), PLearn::SumVarianceOfLinearTransformedCategoricals::bprop(), PLearn::DiagonalizedFactorsProductVariable::bprop(), PLearn::LogAddVariable::bprop(), PLearn::SumOverBagsVariable::build_(), defineGradientLocation(), defineValueLocation(), PLearn::CCCostVariable::fbprop(), PLearn::ConcatOfVariable::fbprop(), PLearn::MatrixSumOfVariable::fbprop(), PLearn::SumOfVariable::fbprop(), PLearn::SumOverBagsVariable::fbprop(), makeDeepCopyFromShallowCopy(), makePointTo(), makeSharedGradient(), PLearn::UnfoldedSumOfVariable::printInfo(), PLearn::MatrixSumOfVariable::printInfo(), PLearn::CCCostVariable::printInfo(), PLearn::SumOverBagsVariable::printInfo(), PLearn::SumOfVariable::printInfo(), PLearn::UnfoldedFuncVariable::printInfo(), resize(), updateAndClear(), and Variable().
int PLearn::Variable::gradient_status [protected] |
0: no gradient was accumulated, 1: to some rows, 2: everywhere.
Definition at line 141 of file Variable.h.
Referenced by update(), updateAndClear(), and updateWithWeightDecay().
set to gradient.data()
Definition at line 154 of file Variable.h.
Referenced by PLearn::SquareVariable::bbprop(), PLearn::SigmoidVariable::bbprop(), PLearn::ConcatColumnsVariable::bprop(), PLearn::ExtractVariable::bprop(), PLearn::PlusScalarVariable::bprop(), PLearn::SoftSlopeIntegralVariable::bprop(), PLearn::SumEntropyOfBernoullis::bprop(), PLearn::VarElementVariable::bprop(), PLearn::AbsVariable::bprop(), PLearn::ExpVariable::bprop(), PLearn::MatrixOneHotSquaredLoss::bprop(), PLearn::MatrixSoftmaxLossVariable::bprop(), PLearn::MinusScalarVariable::bprop(), PLearn::NoBpropVariable::bprop(), PLearn::ReshapeVariable::bprop(), PLearn::TimesScalarVariable::bprop(), PLearn::DivVariable::bprop(), PLearn::IndexAtPositionVariable::bprop(), PLearn::LogSumVariable::bprop(), PLearn::MinusTransposedColumnVariable::bprop(), PLearn::PlusColumnVariable::bprop(), PLearn::SumAbsVariable::bprop(), PLearn::CrossEntropyVariable::bprop(), PLearn::DotProductVariable::bprop(), PLearn::InterValuesVariable::bprop(), PLearn::SoftplusVariable::bprop(), PLearn::SubMatTransposeVariable::bprop(), PLearn::DuplicateScalarVariable::bprop(), PLearn::HardSlopeVariable::bprop(), PLearn::HeterogenuousAffineTransformVariable::bprop(), PLearn::MaxVariable::bprop(), PLearn::TanhVariable::bprop(), PLearn::TimesRowVariable::bprop(), PLearn::WeightedLogGaussian::bprop(), PLearn::ConcatRowsVariable::bprop(), PLearn::SoftmaxVariable::bprop(), PLearn::VarArrayElementVariable::bprop(), PLearn::ColumnIndexVariable::bprop(), PLearn::DuplicateColumnVariable::bprop(), PLearn::ErfVariable::bprop(), PLearn::MinVariable::bprop(), PLearn::ThresholdBpropVariable::bprop(), PLearn::WeightedSumSquareVariable::bprop(), PLearn::IfThenElseVariable::bprop(), PLearn::PlusManyVariable::bprop(), PLearn::PowVariableVariable::bprop(), PLearn::DilogarithmVariable::bprop(), PLearn::ElementAtPositionVariable::bprop(), PLearn::LiftOutputVariable::bprop(), PLearn::LinearCombinationOfScalarVariables::bprop(), PLearn::RandomForcedValuesVariable::bprop(), PLearn::ScoreLayerVariable::bprop(), PLearn::SoftSlopeVariable::bprop(), PLearn::SubMatVariable::bprop(), PLearn::SumVariable::bprop(), PLearn::CutAboveThresholdVariable::bprop(), PLearn::CutBelowThresholdVariable::bprop(), PLearn::LocalizedFeaturesLayerVariable::bprop(), PLearn::NegCrossEntropySigmoidVariable::bprop(), PLearn::RowSumVariable::bprop(), PLearn::SumSquareVariable::bprop(), PLearn::ConfRatedAdaboostCostVariable::bprop(), PLearn::OneHotSquaredLoss::bprop(), PLearn::OutputVariable::bprop(), PLearn::SumEntropyOfCategoricals::bprop(), PLearn::TimesVariable::bprop(), PLearn::ArgminOfVariable::bprop(), PLearn::ColumnSumVariable::bprop(), PLearn::PowVariable::bprop(), PLearn::RowSumSquareVariable::bprop(), PLearn::InvertElementsVariable::bprop(), PLearn::LogVariable::bprop(), PLearn::MinusColumnVariable::bprop(), PLearn::PlusVariable::bprop(), PLearn::SaltPepperNoiseVariable::bprop(), PLearn::SemiSupervisedProbClassCostVariable::bprop(), PLearn::SoftmaxLossVariable::bprop(), PLearn::DuplicateRowVariable::bprop(), PLearn::PLogPVariable::bprop(), PLearn::PlusConstantVariable::bprop(), PLearn::SigmoidVariable::bprop(), PLearn::TimesColumnVariable::bprop(), PLearn::TimesConstantVariable::bprop(), PLearn::TransposeVariable::bprop(), PLearn::FNetLayerVariable::bprop(), PLearn::GradientAdaboostCostVariable::bprop(), PLearn::IdentityVariable::bprop(), PLearn::LogSoftmaxVariable::bprop(), PLearn::MarginPerceptronCostVariable::bprop(), PLearn::SquareRootVariable::bprop(), PLearn::MinusRowVariable::bprop(), PLearn::MinusVariable::bprop(), PLearn::NegateElementsVariable::bprop(), PLearn::SquareVariable::bprop(), PLearn::TimesConstantScalarVariable2::bprop(), PLearn::ExtendedVariable::bprop(), PLearn::HeterogenuousAffineTransformWeightPenalty::bprop(), PLearn::PlusRowVariable::bprop(), PLearn::UnaryHardSlopeVariable::bprop(), defineGradientLocation(), defineValueLocation(), PLearn::SumOfVariable::fbprop(), makeDeepCopyFromShallowCopy(), makePointTo(), makeSharedGradient(), resize(), updateAndClear(), and Variable().
bool PLearn::Variable::marked [protected] |
used for building the propagation paths
Definition at line 137 of file Variable.h.
Referenced by PLearn::BinaryVariable::ancestors(), PLearn::ObjectOptionVariable::ancestors(), PLearn::NaryVariable::ancestors(), PLearn::UnaryVariable::ancestors(), PLearn::SourceVariable::ancestors(), PLearn::BinaryVariable::buildPath(), PLearn::UnaryVariable::buildPath(), PLearn::SourceVariable::buildPath(), PLearn::ObjectOptionVariable::buildPath(), PLearn::NaryVariable::buildPath(), PLearn::SourceVariable::markPath(), PLearn::UnaryVariable::markPath(), PLearn::BinaryVariable::markPath(), PLearn::ObjectOptionVariable::markPath(), PLearn::NaryVariable::markPath(), PLearn::UnaryVariable::random_sources(), PLearn::NaryVariable::random_sources(), PLearn::BinaryVariable::random_sources(), PLearn::SourceVariable::random_sources(), PLearn::ObjectOptionVariable::random_sources(), PLearn::BinaryVariable::sources(), PLearn::ObjectOptionVariable::sources(), PLearn::UnaryVariable::sources(), PLearn::NaryVariable::sources(), PLearn::SourceVariable::sources(), PLearn::NaryVariable::unmarkAncestors(), PLearn::ObjectOptionVariable::unmarkAncestors(), PLearn::BinaryVariable::unmarkAncestors(), PLearn::UnaryVariable::unmarkAncestors(), and PLearn::SourceVariable::unmarkAncestors().
optionally computed second derivative (see bbprop methods)
Definition at line 151 of file Variable.h.
Referenced by makePointTo(), and resizeDiagHessian().
Definition at line 148 of file Variable.h.
Referenced by PLearn::TransposeProductVariable::bbprop(), PLearn::ProductVariable::bbprop(), PLearn::ProductTransposeVariable::bbprop(), PLearn::ConvolveVariable::bprop(), PLearn::SoftSoftMaxVariable::bprop(), PLearn::ProductTransposeVariable::bprop(), PLearn::TransposeProductVariable::bprop(), PLearn::ProductVariable::bprop(), PLearn::MatrixSoftmaxVariable::bprop(), PLearn::ProbabilityPairsInverseVariable::bprop(), PLearn::MultiMaxVariable::bprop(), PLearn::VarColumnsVariable::bprop(), PLearn::WeightedLogGaussian::bprop(), PLearn::LogSoftSoftMaxVariable::bprop(), PLearn::MatrixElementsVariable::bprop(), PLearn::ConstrainVariable::bprop(), PLearn::InsertZerosVariable::bprop(), PLearn::NllGeneralGaussianVariable::bprop(), PLearn::DoubleProductVariable::bprop(), PLearn::ProbabilityPairsVariable::bprop(), PLearn::RowAtPositionVariable::bprop(), PLearn::UnfoldedFuncVariable::bprop(), PLearn::Cov2CorrVariable::bprop(), PLearn::VarRowsVariable::bprop(), PLearn::SubsampleVariable::bprop(), PLearn::FNetLayerVariable::bprop(), PLearn::TraceVariable::bprop(), PLearn::TransposedDoubleProductVariable::bprop(), PLearn::NllSemisphericalGaussianVariable::bprop(), PLearn::DiagonalizedFactorsProductVariable::bprop(), PLearn::UnaryVariable::checkContiguity(), defineGradientLocation(), defineValueLocation(), PLearn::MatrixElementsVariable::fbprop(), makeDeepCopyFromShallowCopy(), makePointTo(), makeSharedGradient(), resize(), update(), updateAndClear(), updateWithWeightDecay(), and Variable().
Definition at line 150 of file Variable.h.
Referenced by makePointTo(), makeSharedRValue(), resizeRValue(), PLearn::RowAtPositionVariable::rfprop(), PLearn::ProductVariable::rfprop(), PLearn::ProductTransposeVariable::rfprop(), and PLearn::TransposeProductVariable::rfprop().
Definition at line 147 of file Variable.h.
Referenced by PLearn::ConcatColumnsVariable::bprop(), PLearn::MatrixSoftmaxVariable::bprop(), PLearn::MultiMaxVariable::bprop(), PLearn::WeightedLogGaussian::bprop(), PLearn::LogSoftSoftMaxVariable::bprop(), PLearn::Cov2CorrVariable::bprop(), PLearn::FNetLayerVariable::bprop(), PLearn::DiagonalizedFactorsProductVariable::bprop(), PLearn::ObjectOptionVariable::build_(), PLearn::FNetLayerVariable::build_(), PLearn::UnaryVariable::checkContiguity(), defineGradientLocation(), defineValueLocation(), PLearn::MatrixElementsVariable::fbprop(), PLearn::HeterogenuousAffineTransformVariable::fprop(), PLearn::MultiMaxVariable::fprop(), PLearn::RunICPVariable::fprop(), PLearn::SubsampleVariable::fprop(), PLearn::FNetLayerVariable::fprop(), PLearn::TransposedDoubleProductVariable::fprop(), PLearn::MatrixElementsVariable::fprop(), PLearn::DiagonalizedFactorsProductVariable::fprop(), PLearn::InsertZerosVariable::fprop(), PLearn::LeftPseudoInverseVariable::fprop(), PLearn::MultiSampleVariable::fprop(), PLearn::ConcatColumnsVariable::fprop(), PLearn::DoubleProductVariable::fprop(), PLearn::MatrixInverseVariable::fprop(), PLearn::ProbabilityPairsVariable::fprop(), PLearn::RightPseudoInverseVariable::fprop(), PLearn::RowOfVariable::fprop(), PLearn::UnfoldedFuncVariable::fprop(), PLearn::MatrixSoftmaxVariable::fprop(), PLearn::ProbabilityPairsInverseVariable::fprop(), PLearn::VarColumnsVariable::fprop(), PLearn::WeightedLogGaussian::fprop(), PLearn::LogSoftSoftMaxVariable::fprop(), PLearn::TraceVariable::fprop(), PLearn::ConstrainVariable::fprop(), PLearn::ConvolveVariable::fprop(), PLearn::SoftSoftMaxVariable::fprop(), PLearn::ProductTransposeVariable::fprop(), PLearn::RowAtPositionVariable::fprop(), PLearn::TransposeProductVariable::fprop(), PLearn::Cov2CorrVariable::fprop(), PLearn::ObjectOptionVariable::fprop(), PLearn::ProductVariable::fprop(), PLearn::VarRowsVariable::fprop(), makeDeepCopyFromShallowCopy(), makePointTo(), makeSharedValue(), PLearn::SourceVariable::randomInitialize(), resize(), setValueSubMat(), update(), updateAndClear(), updateWithWeightDecay(), and Variable().
box constraints on values
Reimplemented in PLearn::UniformSampleVariable.
Definition at line 155 of file Variable.h.
Referenced by PLearn::ConstrainVariable::bprop(), maxUpdate(), update(), and updateAndClear().
Reimplemented in PLearn::UniformSampleVariable.
Definition at line 155 of file Variable.h.
Referenced by PLearn::ConstrainVariable::bprop(), maxUpdate(), update(), and updateAndClear().
int PLearn::Variable::nvars = 0 [static] |
keeps track of how many vars have been created (also used for the default naming scheme, see getName() )
Definition at line 133 of file Variable.h.
Referenced by PLearn::displayVarGraph(), and PLearn::OldDisplayVarGraph().
TVec<int> PLearn::Variable::rows_to_update [protected] |
the list of rows to update.
Definition at line 142 of file Variable.h.
Referenced by PLearn::SourceVariable::makeDeepCopyFromShallowCopy(), makePointTo(), update(), updateAndClear(), and updateWithWeightDecay().
Definition at line 149 of file Variable.h.
Referenced by PLearn::SquareRootVariable::bprop(), makePointTo(), makeSharedRValue(), resizeRValue(), PLearn::ExtendedVariable::rfprop(), PLearn::SubMatVariable::rfprop(), PLearn::SoftmaxLossVariable::rfprop(), PLearn::TimesRowVariable::rfprop(), PLearn::PlusScalarVariable::rfprop(), PLearn::SumOfVariable::rfprop(), PLearn::LogVariable::rfprop(), PLearn::ElementAtPositionVariable::rfprop(), PLearn::MinusScalarVariable::rfprop(), PLearn::RowAtPositionVariable::rfprop(), PLearn::VarRowVariable::rfprop(), PLearn::TimesColumnVariable::rfprop(), PLearn::ProductVariable::rfprop(), PLearn::IfThenElseVariable::rfprop(), PLearn::SigmoidVariable::rfprop(), PLearn::TimesConstantVariable::rfprop(), PLearn::TimesScalarVariable::rfprop(), PLearn::ConcatRowsVariable::rfprop(), PLearn::NegateElementsVariable::rfprop(), PLearn::SubMatTransposeVariable::rfprop(), PLearn::AbsVariable::rfprop(), PLearn::InvertElementsVariable::rfprop(), PLearn::ProductTransposeVariable::rfprop(), PLearn::DivVariable::rfprop(), PLearn::PlusColumnVariable::rfprop(), PLearn::TimesConstantScalarVariable2::rfprop(), PLearn::DotProductVariable::rfprop(), PLearn::OneHotVariable::rfprop(), PLearn::SumVariable::rfprop(), PLearn::ExpVariable::rfprop(), PLearn::IsAboveThresholdVariable::rfprop(), PLearn::PlusConstantVariable::rfprop(), PLearn::SquareVariable::rfprop(), PLearn::TransposeProductVariable::rfprop(), PLearn::VarElementVariable::rfprop(), PLearn::SoftmaxVariable::rfprop(), PLearn::TanhVariable::rfprop(), and PLearn::PlusRowVariable::rfprop().
Definition at line 159 of file Variable.h.
Referenced by PLearn::SquareRootVariable::bprop(), makePointTo(), makeSharedRValue(), resizeRValue(), PLearn::NaryVariable::resizeRValue(), PLearn::ExtendedVariable::rfprop(), PLearn::SubMatVariable::rfprop(), PLearn::SoftmaxLossVariable::rfprop(), PLearn::TimesRowVariable::rfprop(), PLearn::PlusScalarVariable::rfprop(), PLearn::LogVariable::rfprop(), PLearn::ElementAtPositionVariable::rfprop(), PLearn::MinusScalarVariable::rfprop(), PLearn::TimesColumnVariable::rfprop(), PLearn::IfThenElseVariable::rfprop(), PLearn::SigmoidVariable::rfprop(), PLearn::TimesConstantVariable::rfprop(), PLearn::TimesScalarVariable::rfprop(), PLearn::ConcatRowsVariable::rfprop(), PLearn::OneHotSquaredLoss::rfprop(), PLearn::NegateElementsVariable::rfprop(), PLearn::SubMatTransposeVariable::rfprop(), PLearn::AbsVariable::rfprop(), PLearn::InvertElementsVariable::rfprop(), PLearn::DivVariable::rfprop(), PLearn::PlusColumnVariable::rfprop(), PLearn::TimesConstantScalarVariable2::rfprop(), PLearn::DotProductVariable::rfprop(), PLearn::SumVariable::rfprop(), PLearn::ExpVariable::rfprop(), PLearn::PlusConstantVariable::rfprop(), PLearn::SquareVariable::rfprop(), PLearn::VarElementVariable::rfprop(), PLearn::SoftmaxVariable::rfprop(), PLearn::TanhVariable::rfprop(), and PLearn::PlusRowVariable::rfprop().
Definition at line 145 of file Variable.h.
Referenced by PLearn::NllSemisphericalGaussianVariable::bprop(), PLearn::LogAddVariable::bprop(), PLearn::DiagonalizedFactorsProductVariable::bprop(), PLearn::ObjectOptionVariable::build_(), PLearn::LocalizedFeaturesLayerVariable::build_(), defineGradientLocation(), defineValueLocation(), PLearn::SumOverBagsVariable::fbprop(), PLearn::SumOfVariable::fbprop(), PLearn::MatrixSumOfVariable::fbprop(), PLearn::ConcatOfVariable::fbprop(), PLearn::WeightedLogGaussian::fprop(), PLearn::VarRowVariable::fprop(), PLearn::UnfoldedSumOfVariable::fprop(), PLearn::SVDVariable::fprop(), PLearn::SumVarianceOfLinearTransformedCategoricals::fprop(), PLearn::SumVarianceOfLinearTransformedBernoullis::fprop(), PLearn::SumOverBagsVariable::fprop(), PLearn::SumOfVariable::fprop(), PLearn::SparseIncrementalAffineTransformVariable::fprop(), PLearn::SoftmaxVariable::fprop(), PLearn::SaltPepperNoiseVariable::fprop(), PLearn::RowSumVariable::fprop(), PLearn::RowSumSquareVariable::fprop(), PLearn::RowAtPositionVariable::fprop(), PLearn::RandomForcedValuesVariable::fprop(), PLearn::ProjectionErrorVariable::fprop(), PLearn::PotentialsVariable::fprop(), PLearn::PDistributionVariable::fprop(), PLearn::OneHotVariable::fprop(), PLearn::ObjectOptionVariable::fprop(), PLearn::NonDiagVariable::fprop(), PLearn::NllSemisphericalGaussianVariable::fprop(), PLearn::NllGeneralGaussianVariable::fprop(), PLearn::Min2Variable::fprop(), PLearn::Max2Variable::fprop(), PLearn::MatRowVariable::fprop(), PLearn::MatrixSumOfVariable::fprop(), PLearn::LogSoftmaxVariable::fprop(), PLearn::LogAddVariable::fprop(), PLearn::IndexAtPositionVariable::fprop(), PLearn::IfThenElseVariable::fprop(), PLearn::GaussianProcessNLLVariable::fprop(), PLearn::ElementAtPositionVariable::fprop(), PLearn::DiagVariable::fprop(), PLearn::DiagonalizedFactorsProductVariable::fprop(), PLearn::ConcatOfVariable::fprop(), PLearn::ColumnSumVariable::fprop(), PLearn::CCCostVariable::fprop(), PLearn::BiasWeightAffineTransformVariable::fprop(), PLearn::ArgminOfVariable::fprop(), PLearn::AffineTransformVariable::fprop(), PLearn::AdditiveGaussianNoiseVariable::fprop(), PLearn::SumOverBagsVariable::fpropOneBag(), PLearn::GaussianProcessNLLVariable::logVarray(), makeDeepCopyFromShallowCopy(), makePointTo(), makeSharedValue(), oldread(), PLearn::UnfoldedSumOfVariable::printInfo(), PLearn::UnfoldedFuncVariable::printInfo(), PLearn::SumOverBagsVariable::printInfo(), PLearn::SumOfVariable::printInfo(), PLearn::MatrixSumOfVariable::printInfo(), PLearn::CCCostVariable::printInfo(), resize(), updateAndClear(), Variable(), and write().
Convenience variables.
Set to value.data()
Definition at line 153 of file Variable.h.
Referenced by PLearn::TanhVariable::bbprop(), PLearn::SigmoidVariable::bbprop(), PLearn::SoftSlopeIntegralVariable::bprop(), PLearn::ExpVariable::bprop(), PLearn::MatrixSoftmaxLossVariable::bprop(), PLearn::HeterogenuousAffineTransformVariable::bprop(), PLearn::MaxVariable::bprop(), PLearn::TanhVariable::bprop(), PLearn::SoftmaxVariable::bprop(), PLearn::MinVariable::bprop(), PLearn::IfThenElseVariable::bprop(), PLearn::PowVariableVariable::bprop(), PLearn::LocalizedFeaturesLayerVariable::bprop(), PLearn::ConfRatedAdaboostCostVariable::bprop(), PLearn::SoftmaxLossVariable::bprop(), PLearn::SigmoidVariable::bprop(), PLearn::FNetLayerVariable::bprop(), PLearn::LogSoftmaxVariable::bprop(), PLearn::NegLogPoissonVariable::bprop(), PLearn::HeterogenuousAffineTransformWeightPenalty::bprop(), PLearn::UnaryHardSlopeVariable::bprop(), PLearn::ExtendedVariable::build_(), defineGradientLocation(), defineValueLocation(), PLearn::DuplicateRowVariable::fprop(), PLearn::DuplicateScalarVariable::fprop(), PLearn::HardSlopeVariable::fprop(), PLearn::HeterogenuousAffineTransformVariable::fprop(), PLearn::MiniBatchClassificationLossVariable::fprop(), PLearn::PLogPVariable::fprop(), PLearn::MultinomialSampleVariable::fprop(), PLearn::DiagonalNormalSampleVariable::fprop(), PLearn::SigmoidVariable::fprop(), PLearn::TanhVariable::fprop(), PLearn::TimesConstantVariable::fprop(), PLearn::TimesRowVariable::fprop(), PLearn::TransposeVariable::fprop(), PLearn::DeterminantVariable::fprop(), PLearn::FNetLayerVariable::fprop(), PLearn::GradientAdaboostCostVariable::fprop(), PLearn::ArgminVariable::fprop(), PLearn::ColumnIndexVariable::fprop(), PLearn::DuplicateColumnVariable::fprop(), PLearn::MinusVariable::fprop(), PLearn::TimesConstantScalarVariable2::fprop(), PLearn::NLLNeighborhoodWeightsVariable::fprop(), PLearn::OneHotVariable::fprop(), PLearn::PlusRowVariable::fprop(), PLearn::ConcatColumnsVariable::fprop(), PLearn::DilogarithmVariable::fprop(), PLearn::EqualVariable::fprop(), PLearn::UniformSampleVariable::fprop(), PLearn::SumVariable::fprop(), PLearn::AbsVariable::fprop(), PLearn::AdditiveGaussianNoiseVariable::fprop(), PLearn::BinaryClassificationLossVariable::fprop(), PLearn::CutAboveThresholdVariable::fprop(), PLearn::LocalizedFeaturesLayerVariable::fprop(), PLearn::MatrixOneHotSquaredLoss::fprop(), PLearn::MatrixSoftmaxLossVariable::fprop(), PLearn::NoBpropVariable::fprop(), PLearn::ReshapeVariable::fprop(), PLearn::RowSumVariable::fprop(), PLearn::SignVariable::fprop(), PLearn::SumSquareVariable::fprop(), PLearn::DivVariable::fprop(), PLearn::IsLargerVariable::fprop(), PLearn::MinusTransposedColumnVariable::fprop(), PLearn::OutputVariable::fprop(), PLearn::SumAbsVariable::fprop(), PLearn::BernoulliSampleVariable::fprop(), PLearn::ColumnSumVariable::fprop(), PLearn::CrossEntropyVariable::fprop(), PLearn::DotProductVariable::fprop(), PLearn::InterValuesVariable::fprop(), PLearn::IsMissingVariable::fprop(), PLearn::PowVariable::fprop(), PLearn::RowSumSquareVariable::fprop(), PLearn::EqualConstantVariable::fprop(), PLearn::LogVariable::fprop(), PLearn::MaxVariable::fprop(), PLearn::MinusColumnVariable::fprop(), PLearn::PlusVariable::fprop(), PLearn::SaltPepperNoiseVariable::fprop(), PLearn::SoftmaxLossVariable::fprop(), PLearn::WeightedLogGaussian::fprop(), PLearn::ArgmaxVariable::fprop(), PLearn::ConcatRowsVariable::fprop(), PLearn::MulticlassLossVariable::fprop(), PLearn::PlusConstantVariable::fprop(), PLearn::ReIndexedTargetVariable::fprop(), PLearn::TimesColumnVariable::fprop(), PLearn::VarArrayElementVariable::fprop(), PLearn::ErfVariable::fprop(), PLearn::IdentityVariable::fprop(), PLearn::IsAboveThresholdVariable::fprop(), PLearn::IsSmallerVariable::fprop(), PLearn::MarginPerceptronCostVariable::fprop(), PLearn::MinVariable::fprop(), PLearn::NegLogPoissonVariable::fprop(), PLearn::SquareRootVariable::fprop(), PLearn::ThresholdBpropVariable::fprop(), PLearn::WeightedSumSquareVariable::fprop(), PLearn::IfThenElseVariable::fprop(), PLearn::MinusRowVariable::fprop(), PLearn::NegateElementsVariable::fprop(), PLearn::PlusManyVariable::fprop(), PLearn::PowVariableVariable::fprop(), PLearn::SquareVariable::fprop(), PLearn::ElementAtPositionVariable::fprop(), PLearn::ExtendedVariable::fprop(), PLearn::HeterogenuousAffineTransformWeightPenalty::fprop(), PLearn::LiftOutputVariable::fprop(), PLearn::LinearCombinationOfScalarVariables::fprop(), PLearn::RandomForcedValuesVariable::fprop(), PLearn::ScoreLayerVariable::fprop(), PLearn::SoftSlopeVariable::fprop(), PLearn::SubMatVariable::fprop(), PLearn::UnaryHardSlopeVariable::fprop(), PLearn::CutBelowThresholdVariable::fprop(), PLearn::ExtractVariable::fprop(), PLearn::NegCrossEntropySigmoidVariable::fprop(), PLearn::PlusScalarVariable::fprop(), PLearn::SoftSlopeIntegralVariable::fprop(), PLearn::SumEntropyOfBernoullis::fprop(), PLearn::VarElementVariable::fprop(), PLearn::VecElementVariable::fprop(), PLearn::ClassificationLossVariable::fprop(), PLearn::ConfRatedAdaboostCostVariable::fprop(), PLearn::ExpVariable::fprop(), PLearn::MinusScalarVariable::fprop(), PLearn::OneHotSquaredLoss::fprop(), PLearn::SumEntropyOfCategoricals::fprop(), PLearn::TimesScalarVariable::fprop(), PLearn::TimesVariable::fprop(), PLearn::EqualScalarVariable::fprop(), PLearn::IndexAtPositionVariable::fprop(), PLearn::LogSumVariable::fprop(), PLearn::PlusColumnVariable::fprop(), PLearn::UnequalConstantVariable::fprop(), PLearn::InvertElementsVariable::fprop(), PLearn::SemiSupervisedProbClassCostVariable::fprop(), PLearn::SoftplusVariable::fprop(), PLearn::SubMatTransposeVariable::fprop(), makeDeepCopyFromShallowCopy(), makePointTo(), makeSharedValue(), maxUpdate(), resize(), PLearn::SoftmaxLossVariable::rfprop(), PLearn::IfThenElseVariable::rfprop(), PLearn::SigmoidVariable::rfprop(), PLearn::InvertElementsVariable::rfprop(), PLearn::ExpVariable::rfprop(), PLearn::SoftmaxVariable::rfprop(), PLearn::TanhVariable::rfprop(), update(), updateAndClear(), and Variable().
string PLearn::Variable::varname [protected] |
used when printing or drawing the var graph (see setName and getName)
Definition at line 138 of file Variable.h.
Referenced by PLearn::ScoreLayerVariable::declareOptions(), getName(), and setName().
number of this variable (the first one created is numbered 1, the second 2, etc...)
Definition at line 134 of file Variable.h.
Referenced by getName().