#include <TangentLearner.h>
Inheritance diagram for PLearn::TangentLearner:
Public Member Functions | |
TangentLearner () | |
Default constructor. | |
virtual void | build () |
Simply calls inherited::build() then build_(). | |
virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
Transforms a shallow copy into a deep copy. | |
PLEARN_DECLARE_OBJECT (TangentLearner) | |
virtual int | outputsize () const |
Returns the size of this learner's output, (which typically may depend on its inputsize(), targetsize() and set options). | |
virtual void | forget () |
(Re-)initializes the PLearner in its fresh state (that state may depend on the 'seed' option) And sets 'stage' back to 0 (this is the stage of a fresh learner!). | |
virtual void | initializeParams () |
virtual void | train () |
The role of the train method is to bring the learner up to stage==nstages, updating the train_stats collector with training costs measured on-line in the process. | |
virtual void | computeOutput (const Vec &input, Vec &output) const |
Computes the output from the input. | |
virtual void | computeCostsFromOutputs (const Vec &input, const Vec &output, const Vec &target, Vec &costs) const |
Computes the costs from already computed output. | |
virtual TVec< string > | getTestCostNames () const |
Returns the names of the costs computed by computeCostsFromOutpus (and thus the test method). | |
virtual TVec< string > | getTrainCostNames () const |
Returns the names of the objective costs that the train method computes and for which it updates the VecStatsCollector train_stats. | |
Public Attributes | |
string | training_targets |
bool | use_subspace_distance |
bool | normalize_by_neighbor_distance |
bool | ordered_vectors |
real | smart_initialization |
real | initialization_regularization |
int | n_neighbors |
int | n_dim |
PP< Optimizer > | optimizer |
Var | embedding |
Func | output_f |
Func | tangent_predictor |
Func | projection_error_f |
string | architecture_type |
string | output_type |
int | n_hidden_units |
int | batch_size |
real | norm_penalization |
real | svd_threshold |
real | projection_error_regularization |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Protected Attributes | |
Func | cost_of_one_example |
Var | b |
Var | W |
Var | c |
Var | V |
Var | tangent_targets |
VarArray | parameters |
Private Types | |
typedef PLearner | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::PLearner. Definition at line 59 of file TangentLearner.h. |
|
Default constructor.
Definition at line 96 of file TangentLearner.cc. |
|
Simply calls inherited::build() then build_().
Reimplemented from PLearn::PLearner. Definition at line 347 of file TangentLearner.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::PLearner. Definition at line 252 of file TangentLearner.cc. References architecture_type, cost_of_one_example, PLearn::diagonalized_factors_product(), embedding, n_dim, n_hidden_units, n_neighbors, PLearn::VarArray::nelems(), norm_penalization, normalize_by_neighbor_distance, ordered_vectors, output_f, output_type, parameters, PLERROR, PLearn::product(), PLearn::projection_error(), projection_error_f, projection_error_regularization, PLearn::TVec< Var >::resize(), PLearn::TVec< Var >::size(), svd_threshold, tangent_predictor, tangent_targets, PLearn::tanh(), training_targets, use_subspace_distance, V, W, and x. Referenced by build(). |
|
Computes the costs from already computed output.
Implements PLearn::PLearner. Definition at line 506 of file TangentLearner.cc. References PLERROR. |
|
Computes the output from the input.
Implements PLearn::PLearner. Definition at line 499 of file TangentLearner.cc. References output_f, outputsize(), PLearn::TVec< T >::resize(), and PLearn::Vec. |
|
Declares this class' options.
Reimplemented from PLearn::PLearner. Definition at line 153 of file TangentLearner.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
(Re-)initializes the PLearner in its fresh state (that state may depend on the 'seed' option) And sets 'stage' back to 0 (this is the stage of a fresh learner!).
Implements PLearn::PLearner. Definition at line 375 of file TangentLearner.cc. References initializeParams(). |
|
Returns the names of the costs computed by computeCostsFromOutpus (and thus the test method).
Implements PLearn::PLearner. Definition at line 512 of file TangentLearner.cc. References getTrainCostNames(). |
|
Returns the names of the objective costs that the train method computes and for which it updates the VecStatsCollector train_stats.
Implements PLearn::PLearner. Definition at line 517 of file TangentLearner.cc. Referenced by getTestCostNames(). |
|
Definition at line 444 of file TangentLearner.cc. References architecture_type, PLearn::fill_random_uniform(), initialization_regularization, PLearn::PLearner::inputsize(), PLearn::manual_seed(), n_hidden_units, optimizer, PLERROR, PLearn::seed(), smart_initialization, PLearn::smartInitialization(), PLearn::sqrt(), V, and W. Referenced by forget(). |
|
Transforms a shallow copy into a deep copy.
Definition at line 355 of file TangentLearner.cc. References cost_of_one_example, PLearn::deepCopyField(), optimizer, parameters, tangent_predictor, tangent_targets, V, PLearn::varDeepCopyField(), and W. |
|
Returns the size of this learner's output, (which typically may depend on its inputsize(), targetsize() and set options).
Implements PLearn::PLearner. Definition at line 370 of file TangentLearner.cc. References output_f. Referenced by computeOutput(). |
|
|
|
The role of the train method is to bring the learner up to stage==nstages, updating the train_stats collector with training costs measured on-line in the process.
Implements PLearn::PLearner. Definition at line 381 of file TangentLearner.cc. References batch_size, cost_of_one_example, PLearn::endl(), PLearn::hconcat(), PLearn::PLearner::inputsize(), PLearn::VMat::length(), PLearn::local_neighbors_differences(), PLearn::meanOf(), n_neighbors, optimizer, parameters, PLERROR, PLearn::tostring(), training_targets, and PLearn::ProgressBar::update(). |
|
Definition at line 99 of file TangentLearner.h. Referenced by build_(), and initializeParams(). |
|
Definition at line 65 of file TangentLearner.h. |
|
Definition at line 103 of file TangentLearner.h. Referenced by train(). |
|
Definition at line 65 of file TangentLearner.h. |
|
Definition at line 64 of file TangentLearner.h. Referenced by build_(), makeDeepCopyFromShallowCopy(), and train(). |
|
Definition at line 93 of file TangentLearner.h. Referenced by build_(). |
|
Definition at line 88 of file TangentLearner.h. Referenced by initializeParams(). |
|
Definition at line 90 of file TangentLearner.h. Referenced by build_(). |
|
Definition at line 101 of file TangentLearner.h. Referenced by build_(), and initializeParams(). |
|
Definition at line 89 of file TangentLearner.h. |
|
Definition at line 105 of file TangentLearner.h. Referenced by build_(). |
|
Definition at line 85 of file TangentLearner.h. Referenced by build_(). |
|
Definition at line 92 of file TangentLearner.h. Referenced by initializeParams(), makeDeepCopyFromShallowCopy(), and train(). |
|
Definition at line 86 of file TangentLearner.h. Referenced by build_(). |
|
Definition at line 94 of file TangentLearner.h. Referenced by build_(), computeOutput(), and outputsize(). |
|
Definition at line 100 of file TangentLearner.h. Referenced by build_(). |
|
Definition at line 73 of file TangentLearner.h. Referenced by build_(), makeDeepCopyFromShallowCopy(), and train(). |
|
Definition at line 96 of file TangentLearner.h. Referenced by build_(). |
|
Definition at line 107 of file TangentLearner.h. Referenced by build_(). |
|
Definition at line 87 of file TangentLearner.h. Referenced by initializeParams(). |
|
Definition at line 106 of file TangentLearner.h. Referenced by build_(). |
|
Definition at line 95 of file TangentLearner.h. Referenced by build_(), and makeDeepCopyFromShallowCopy(). |
|
Definition at line 66 of file TangentLearner.h. Referenced by build_(), and makeDeepCopyFromShallowCopy(). |
|
Definition at line 83 of file TangentLearner.h. |
|
Definition at line 84 of file TangentLearner.h. Referenced by build_(). |
|
Definition at line 65 of file TangentLearner.h. Referenced by build_(), initializeParams(), and makeDeepCopyFromShallowCopy(). |
|
Definition at line 65 of file TangentLearner.h. Referenced by build_(), initializeParams(), and makeDeepCopyFromShallowCopy(). |