#include <Variable.h>
Inheritance diagram for PLearn::Variable:
Public Types | |
typedef Object | inherited |
Public Member Functions | |
Variable (int thelength, int thewidth) | |
Variable (const Mat &m) | |
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 () |
Should call simply inherited::build(), then this class's build_(). | |
bool | isScalar () const |
bool | isVec () const |
bool | isColumnVec () const |
bool | isRowVec () const |
PLEARN_DECLARE_ABSTRACT_OBJECT (Variable) | |
virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
virtual void | fprop ()=0 |
compute output given input | |
void | sizefprop () |
compute dC/dinput given dC/doutput Calls sizeprop, then fprop | |
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) |
virtual void | print (ostream &out) const |
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 | defineGradientLocation (const Mat &m) |
Defines a new Mat to use as this Var's matGradient field, modifies gradient and graidentdata 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 | clearGradient () |
void | clearDiagHessian () |
void | clearSymbolicGradient () |
bool | update (real step_size, Vec direction_vec, real coeff=1.0, real b=0.0) |
bool | update (Vec step_sizes, Vec direction_vec, real coeff=1.0, real b=0.0) |
void | updateAndClear () |
Does value += gradient; gradient.clear();. | |
bool | update (real step_size) |
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) | |
bool | update (Vec new_value) |
real | maxUpdate (Vec direction) |
virtual bool | markPath ()=0 |
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) |
DEPRECATED For backward compatibility with old saved object. | |
virtual void | write (ostream &out) const |
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) |
virtual bool | isConstant () |
virtual void | fprop_from_all_sources () |
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 () |
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 |
Set to value.data(). | |
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 | |
int | nvars = 0 |
keeps track of how many vars have been created (also used for the default naming scheme, see getName() ) | |
Protected Member Functions | |
Variable () | |
Default constructor for persistence. | |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down) | |
Protected Attributes | |
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 Member Functions | |
void | build_ () |
|
|
Default constructor for persistence.
Definition at line 107 of file Variable.h. References allows_partial_update, dont_bprop_here, gradient_status, gradientdata, marked, max_value, min_value, nvars, valuedata, varname, and varnum. |
|
Definition at line 167 of file Variable.cc. References PLearn::TVec< T >::data(), gradient, gradientdata, matGradient, matValue, PLearn::TMat< T >::toVec(), value, and valuedata. |
|
this variable's value and m will be views of the same data
Definition at line 180 of file Variable.cc. References PLearn::TVec< T >::data(), gradient, gradientdata, PLearn::TMat< T >::isCompact(), matGradient, matValue, PLERROR, PLearn::TMat< T >::toVec(), value, and valuedata. |
|
Copy constructor.
Definition at line 196 of file Variable.cc. |
|
accumulate the symbolic gradient in a smart way...
Definition at line 384 of file Variable.cc. References g, length(), PLearn::Var::length(), width(), and PLearn::Var::width(). |
|
send message that update may be sometimes needed on only parts of the Variable
Definition at line 302 of file Variable.h. References allows_partial_update, gradient_status, length(), PLearn::TVec< int >::resize(), and rows_to_update. |
|
if not marked, find all Variables that influence this Variable.
Implemented in PLearn::BinaryVariable, PLearn::NaryVariable, PLearn::SourceVariable, and PLearn::UnaryVariable. Referenced by printInfos(). |
|
|
|
|
|
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::SourceVariable, and PLearn::UnaryVariable. |
|
Definition at line 302 of file Variable.cc. References PLearn::TVec< T >::clear(), diaghessian, and resizeDiagHessian(). |
|
Definition at line 261 of file Variable.h. References allows_partial_update, PLearn::TVec< T >::clear(), gradient, gradient_status, PLearn::TVec< int >::length(), matGradient, PLearn::TVec< int >::resize(), PLearn::TMat< T >::row(), and rows_to_update. |
|
Definition at line 257 of file Variable.h. References marked. Referenced by PLearn::UnaryVariable::buildPath(), PLearn::SourceVariable::buildPath(), PLearn::NaryVariable::buildPath(), PLearn::BinaryVariable::buildPath(), and PLearn::SourceVariable::unmarkAncestors(). |
|
Definition at line 277 of file Variable.h. References g. |
|
Definition at line 248 of file Variable.h. References column(), length(), PLearn::subMat(), and PLearn::transpose(). Referenced by column(). |
|
Definition at line 357 of file Variable.h. References copyFrom(), and value. Referenced by copyFrom(). |
|
Definition at line 359 of file Variable.h. References copyGradientFrom(), and gradient. Referenced by copyGradientFrom(). |
|
Definition at line 226 of file Variable.h. References copyGradientInto(), and gradient. Referenced by copyGradientInto(). |
|
Definition at line 360 of file Variable.h. References copyGradientTo(), and gradient. Referenced by copyGradientTo(). |
|
Definition at line 369 of file Variable.h. References copyRValueFrom(), resizeRValue(), and rValue. Referenced by copyRValueFrom(). |
|
Definition at line 370 of file Variable.h. References copyRValueTo(), resizeRValue(), and rValue. Referenced by copyRValueTo(). |
|
Definition at line 358 of file Variable.h. References copyTo(), and value. Referenced by copyTo(). |
|
Definition at line 225 of file Variable.h. References copyValueInto(), and value. Referenced by copyValueInto(). |
|
|
Defines a new Mat to use as this Var's matGradient field, modifies gradient and graidentdata to keep consistent, and returns the previous matGradient.
Definition at line 265 of file Variable.cc. References PLearn::TVec< T >::data(), gradient, gradientdata, PLearn::TMat< T >::isCompact(), matGradient, and PLERROR. |
|
send message that updates must be full.
Definition at line 311 of file Variable.h. References allows_partial_update, and gradient_status. |
|
do fprop, bprop and bbprop
Definition at line 316 of file Variable.cc. |
|
do both fprop and bprop
Reimplemented in PLearn::ConcatOfVariable, PLearn::MatrixElementsVariable, PLearn::MatrixSumOfVariable, PLearn::SumOfVariable, and PLearn::SumOverBagsVariable. Definition at line 310 of file Variable.cc. |
|
Definition at line 260 of file Variable.h. References PLearn::TVec< T >::fill(), fillGradient(), and gradient. Referenced by fillGradient(). |
|
|
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 369 of file Variable.cc. References PLearn::VarArray::fprop(), PLearn::propagationPath(), sources(), and unmarkAncestors(). |
|
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 335 of file Variable.cc. References PLearn::tostring(), varname, and varnum. Referenced by PLearn::UnfoldedSumOfVariable::printInfo(), PLearn::UnfoldedFuncVariable::printInfo(), PLearn::UnaryVariable::printInfo(), PLearn::SumOverBagsVariable::printInfo(), PLearn::SumOfVariable::printInfo(), PLearn::SourceVariable::printInfo(), PLearn::NaryVariable::printInfo(), PLearn::MatrixSumOfVariable::printInfo(), and PLearn::BinaryVariable::printInfo(). |
|
Definition at line 194 of file Variable.h. References width(). Referenced by subVec(). |
|
Reimplemented in PLearn::SourceVariable. Definition at line 375 of file Variable.h. |
|
Definition at line 258 of file Variable.h. References marked. |
|
Definition at line 195 of file Variable.h. References length(). Referenced by subVec(). |
|
Definition at line 192 of file Variable.h. |
|
Definition at line 193 of file Variable.h. |
|
|
|
Definition at line 723 of file Variable.cc. References makeSharedGradient(), PLearn::TVec< T >::offset_, and PLearn::TVec< T >::storage. |
|
Definition at line 728 of file Variable.cc. References PLearn::TVec< T >::data(), gradient, gradientdata, matGradient, PLearn::TMat< T >::mod_, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, PLearn::TMat< T >::storage, PLearn::TVec< T >::storage, PLearn::TMat< T >::width(), and x. |
|
like copyTo but also makes value's point to x
Definition at line 747 of file Variable.cc. References PLearn::TVec< T >::data(), gradient, gradientdata, matGradient, PLearn::TMat< T >::mod_, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, PLearn::TMat< T >::storage, PLearn::TVec< T >::storage, PLearn::TMat< T >::width(), and x. Referenced by makeSharedGradient(). |
|
Definition at line 805 of file Variable.cc. References makeSharedRValue(), PLearn::TVec< T >::offset_, and PLearn::TVec< T >::storage. |
|
Definition at line 768 of file Variable.cc. References PLearn::TVec< T >::data(), matRValue, PLearn::TMat< T >::mod_, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, resizeRValue(), rValue, rvaluedata, PLearn::TMat< T >::storage, PLearn::TVec< T >::storage, PLearn::TMat< T >::width(), and x. |
|
like copyTo but also makes value's point to x
Definition at line 788 of file Variable.cc. References PLearn::TVec< T >::data(), matRValue, PLearn::TMat< T >::mod_, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, resizeRValue(), rValue, rvaluedata, PLearn::TMat< T >::storage, PLearn::TVec< T >::storage, PLearn::TMat< T >::width(), and x. Referenced by makeSharedRValue(). |
|
Definition at line 763 of file Variable.cc. References makeSharedValue(), PLearn::TVec< T >::offset_, and PLearn::TVec< T >::storage. |
|
make value and matValue point into this storage
Definition at line 705 of file Variable.cc. References PLearn::TVec< T >::data(), matValue, PLearn::TMat< T >::mod_, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, PLearn::TMat< T >::storage, PLearn::TVec< T >::storage, value, valuedata, PLearn::TMat< T >::width(), and x. |
|
like copyTo but also makes value's point to x
Definition at line 689 of file Variable.cc. References PLearn::TVec< T >::data(), matValue, PLearn::TMat< T >::mod_, nelems(), PLearn::TMat< T >::offset_, PLearn::TVec< T >::offset_, PLERROR, PLearn::TMat< T >::storage, PLearn::TVec< T >::storage, value, valuedata, PLearn::TMat< T >::width(), and x. Referenced by makeSharedValue(). |
|
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::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 653 of file Variable.cc. References PLearn::TVec< T >::data(), max_value, min_value, nelems(), PLERROR, and valuedata. |
|
Definition at line 235 of file Variable.h. References varname. |
|
|
DEPRECATED For backward compatibility with old saved object.
Reimplemented from PLearn::Object. Definition at line 343 of file Variable.cc. References PLearn::read(), and value. |
|
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::SourceVariable, and PLearn::UnaryVariable. |
|
|
|
Prints a human-readable, short (not necessarily complete) description of this object instance (default prints info()). This is what is called by operator<< on Object Reimplemented from PLearn::Object. Definition at line 276 of file Variable.cc. References PLearn::endl(), and PLearn::Object::info(). |
|
|
Definition at line 377 of file Variable.cc. References ancestors(), PLearn::VarArray::printInfo(), and unmarkAncestors(). |
|
return ancestors which compute a non-deterministic function of their parents
Implemented in PLearn::SourceSampleVariable, PLearn::UnarySampleVariable, PLearn::BinarySampleVariable, PLearn::BinaryVariable, PLearn::NaryVariable, PLearn::SourceVariable, and PLearn::UnaryVariable. |
|
|
resizes the matValue and matGradient fields of this variable (and updates the value, gradient, valuedata and gradientdata fields accordingly)
Definition at line 242 of file Variable.cc. References PLearn::TVec< T >::data(), gradient, gradientdata, matGradient, matValue, PLearn::TMat< T >::resize(), PLearn::TMat< T >::toVec(), value, valuedata, and PLearn::Vec. |
|
resize the DiagHessian field
Definition at line 810 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(). |
|
Reimplemented in PLearn::BinaryVariable, PLearn::NaryVariable, and PLearn::UnaryVariable. Definition at line 817 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 copyRValueFrom(), copyRValueTo(), and makeSharedRValue(). |
|
|
Definition at line 247 of file Variable.h. References row(), PLearn::subMat(), PLearn::transpose(), and width(). |
|
Definition at line 254 of file Variable.h. References max_value, min_value, and setBoxConstraint(). Referenced by setBoxConstraint(). |
|
Definition at line 250 of file Variable.h. References dont_bprop_here, setDontBpropHere(), and val. Referenced by setDontBpropHere(). |
|
Definition at line 251 of file Variable.h. References min_value. |
|
Definition at line 256 of file Variable.h. References marked. Referenced by PLearn::SourceVariable::ancestors(), PLearn::SourceVariable::random_sources(), and PLearn::SourceVariable::sources(). |
|
Definition at line 253 of file Variable.h. References max_value, and setMaxValue(). Referenced by setMaxValue(). |
|
Definition at line 252 of file Variable.h. References min_value, and setMinValue(). Referenced by setMinValue(). |
|
call this to set a name for this variable
Definition at line 332 of file Variable.cc. References varname. Referenced by PLearn::Var::Var(). |
|
set this Variable's parents. To use with default constructor.
Reimplemented in PLearn::BinaryVariable, and PLearn::SourceVariable. Definition at line 262 of file Variable.cc. References c_str(), PLearn::Object::classname(), and PLERROR. |
|
Definition at line 159 of file Variable.h. References matValue, and PLearn::TMat< T >::size(). Referenced by PLearn::SumOfVariable::fbprop(), PLearn::SemiSupervisedProbClassCostVariable::fprop(), and nelems(). |
|
compute dC/dinput given dC/doutput Calls sizeprop, then fprop
Definition at line 206 of file Variable.h. References fprop(), and 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 255 of file Variable.cc. References recomputeSize(), and resize(). Referenced by sizefprop(). |
|
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::SourceVariable, and PLearn::UnaryVariable. Referenced by fprop_from_all_sources(), and verifyGradient(). |
|
Definition at line 361 of file Variable.cc. |
|
Definition at line 350 of file Variable.cc. References isColumnVec(), isRowVec(), PLERROR, PLearn::subMat(), and PLearn::transpose(). |
|
|
undo any marking done by a call to sources() or ancestors()
Implemented in PLearn::BinaryVariable, PLearn::NaryVariable, 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 Definition at line 616 of file Variable.cc. References allows_partial_update, PLearn::TVec< T >::data(), max_value, min_value, nelems(), PLWARNING, and valuedata. |
|
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 Definition at line 480 of file Variable.cc. References allows_partial_update, gradient_status, length(), PLearn::TVec< int >::length(), matGradient, matValue, max_value, min_value, row(), rows_to_update, and width(). |
|
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 Definition at line 448 of file Variable.cc. References allows_partial_update, PLearn::TVec< T >::data(), max_value, min_value, nelems(), PLWARNING, and valuedata. |
|
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 ? Definition at line 409 of file Variable.cc. References allows_partial_update, PLearn::TVec< T >::data(), max_value, min_value, nelems(), PLWARNING, and valuedata. |
|
Does value += gradient; gradient.clear();.
Definition at line 418 of file Variable.h. References PLearn::TVec< T >::clear(), gradient, gradientdata, nelems(), and valuedata. |
|
says that given row has received gradient (should be updated on next call to update)
Definition at line 318 of file Variable.h. References allows_partial_update, PLearn::TVec< int >::append(), PLearn::TVec< int >::contains(), gradient_status, rows_to_update, and updateRow(). Referenced by updateRow(). |
|
call verify gradient for the mapping from all the sources to this Variable.
Definition at line 395 of file Variable.cc. References PLearn::VarArray::nelems(), sources(), and unmarkAncestors(). |
|
|
DEPRECATED (use the declareOption / build_ mecanism instead, that provides automatic serialization) 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 overload write should progressively be moved to the new declareOptions/build mechanism. Reimplemented from PLearn::Object. Definition at line 346 of file Variable.cc. References value, and PLearn::write(). |
|
only if this is true then the following two fields are used.
Definition at line 131 of file Variable.h. Referenced by allowPartialUpdates(), clearGradient(), disallowPartialUpdates(), update(), updateRow(), and Variable(). |
|
optionally computed second derivative (see bbprop methods)
Definition at line 148 of file Variable.h. Referenced by clearDiagHessian(), and resizeDiagHessian(). |
|
set to diaghessian.data() or NULL if no diaghessian
Definition at line 149 of file Variable.h. Referenced by resizeDiagHessian(). |
|
if true, children are encouraged not to bprop gradient in this var (saves computation time)
Definition at line 151 of file Variable.h. Referenced by setDontBpropHere(), and Variable(). |
|
symbolic gradient used for symbolicBprop
Definition at line 147 of file Variable.h. Referenced by accg(), clearSymbolicGradient(), and makeDeepCopyFromShallowCopy(). |
|
Definition at line 137 of file Variable.h. Referenced by clearGradient(), copyGradientFrom(), copyGradientInto(), copyGradientTo(), defineGradientLocation(), fillGradient(), makeDeepCopyFromShallowCopy(), makeSharedGradient(), resize(), updateAndClear(), and Variable(). |
|
0: no gradient was accumulated, 1: to some rows, 2: everywhere.
Definition at line 132 of file Variable.h. Referenced by allowPartialUpdates(), clearGradient(), disallowPartialUpdates(), update(), updateRow(), and Variable(). |
|
set to gradient.data()
Definition at line 145 of file Variable.h. Referenced by defineGradientLocation(), makeDeepCopyFromShallowCopy(), makeSharedGradient(), resize(), updateAndClear(), and Variable(). |
|
used for building the propagation paths
Definition at line 127 of file Variable.h. Referenced by clearMark(), isMarked(), setMark(), and Variable(). |
|
optionally computed second derivative (see bbprop methods)
Definition at line 142 of file Variable.h. Referenced by resizeDiagHessian(). |
|
Definition at line 139 of file Variable.h. Referenced by clearGradient(), defineGradientLocation(), makeDeepCopyFromShallowCopy(), makeSharedGradient(), resize(), update(), and Variable(). |
|
Definition at line 141 of file Variable.h. Referenced by makeSharedRValue(), and resizeRValue(). |
|
Definition at line 138 of file Variable.h. Referenced by length(), makeDeepCopyFromShallowCopy(), makeSharedValue(), resize(), size(), update(), Variable(), and width(). |
|
box constraints on values
Reimplemented in PLearn::UniformSampleVariable. Definition at line 146 of file Variable.h. Referenced by maxUpdate(), setBoxConstraint(), setMaxValue(), update(), and Variable(). |
|
Reimplemented in PLearn::UniformSampleVariable. Definition at line 146 of file Variable.h. Referenced by maxUpdate(), setBoxConstraint(), setKeepPositive(), setMinValue(), update(), and Variable(). |
|
keeps track of how many vars have been created (also used for the default naming scheme, see getName() )
Definition at line 165 of file Variable.cc. Referenced by Variable(). |
|
the list of rows to update.
Definition at line 133 of file Variable.h. Referenced by allowPartialUpdates(), clearGradient(), update(), and updateRow(). |
|
Definition at line 140 of file Variable.h. Referenced by copyRValueFrom(), copyRValueTo(), makeSharedRValue(), and resizeRValue(). |
|
Definition at line 150 of file Variable.h. Referenced by makeSharedRValue(), and resizeRValue(). |
|
Definition at line 136 of file Variable.h. Referenced by copyFrom(), copyTo(), copyValueInto(), makeDeepCopyFromShallowCopy(), makeSharedValue(), oldread(), resize(), Variable(), and write(). |
|
Set to value.data().
Definition at line 144 of file Variable.h. Referenced by makeDeepCopyFromShallowCopy(), makeSharedValue(), maxUpdate(), resize(), update(), updateAndClear(), and Variable(). |
|
used when printing or drawing the var graph (see setName and getName)
Definition at line 128 of file Variable.h. Referenced by getName(), nameIsSet(), setName(), and Variable(). |
|
number of this variable (the first one created is numbered 1, the second 2, etc...)
Definition at line 124 of file Variable.h. Referenced by getName(), and Variable(). |