|
CorTeX Core ABI 7
ToolTech Software · C++ library reference
|
#include <ctxCortexTrainer.h>
Public Member Functions | |
| virtual gzType * | getType () const |
| ctxBackpropTrainer (const ctxBackpropTrainingOptions &options=ctxBackpropTrainingOptions()) | |
| virtual | ~ctxBackpropTrainer () |
| gzBool | setOptimizer (ctxOptimizer *optimizer, ctxOptimizerStatePolicy statePolicy=CTX_OPTIMIZER_STATE_RESET) |
| ctxOptimizer * | getOptimizer () const |
| gzBool | setDropConnect (gzFloat probability) |
| Set the training DropConnect probability for subsequent batches. | |
| gzFloat | getDropConnect () const |
| gzBool | prepare () |
| gzBool | trainStep () |
| Prepare and train the next bounded unit; Backprop consumes one batch. | |
| gzBool | isPrepared () const |
| gzBool | isComplete () const |
| gzBool | train () |
| ctxTrainerProgramProfile | getProgramProfile () const |
| gzUInt32 | getCapabilities () const |
| gzBool | beginEpoch (gzUInt32 epoch) |
| gzBool | beginEpoch (gzUInt32 epoch, const gzArray< gzFloat > &sampleWeights, gzUInt32 seed=0) |
| Explicit weighted epoch over the prepared training prefix, excluding validations. | |
| gzBool | beginIndexedEpoch (gzUInt32 epoch, const ctxIndex &sampleOrder) |
| Install a prebuilt training-prefix order at an epoch boundary. | |
| gzBool | prepareNextBatch () |
| Prepare the next selected batch, without a parameter update. | |
| gzBool | trainPreparedBatch () |
| Train one prepared batch and commit its batch/epoch progress. | |
| gzBool | saveCheckpoint (const gzString &url) const |
| gzBool | loadCheckpoint (const gzString &url) |
| gzUInt32 | getSamples () const |
| gzUInt32 | getValidations () const |
| gzUInt32 | getBatchSize () const |
| gzUInt32 | getSubsetLength () const |
| gzUInt32 | getBatchOffset () const |
| gzUInt32 | getSampleIndex (gzUInt32 page) const |
| gzUInt32 | getIteration () const |
| Public Member Functions inherited from ctxTrainer | |
| ctxTrainer () | |
| virtual gzBool | install (ctxCortex *cortex) |
| Bind this session to one cortex. | |
| ctxCortex * | getCortex () const |
| gzString | getError () const |
Static Public Member Functions | |
| static gzType * | getClassType () |
| Static Public Member Functions inherited from ctxTrainer | |
| static gzType * | getClassType () |
Friends | |
| class | ctxModel |
Additional Inherited Members | |
| Protected Attributes inherited from ctxTrainer | |
| ctxCortexPtr | m_cortex |
| gzString | m_error |
Definition at line 178 of file ctxCortexTrainer.h.
| ctxBackpropTrainer::ctxBackpropTrainer | ( | const ctxBackpropTrainingOptions & | options = ctxBackpropTrainingOptions() | ) |
References CTX_EXPORT.
Referenced by ctxModel.
|
virtual |
References CTX_EXPORT.
| gzBool ctxBackpropTrainer::beginEpoch | ( | gzUInt32 | epoch | ) |
References CTX_EXPORT.
| gzBool ctxBackpropTrainer::beginEpoch | ( | gzUInt32 | epoch, |
| const gzArray< gzFloat > & | sampleWeights, | ||
| gzUInt32 | seed = 0 ) |
Explicit weighted epoch over the prepared training prefix, excluding validations.
Weights must contain getSamples()-getValidations() finite nonnegative entries and have a positive sum. Requires sequence=FALSE and an epoch boundary (no pending batch). The batch/epoch budget stays unchanged; sampling is with replacement and local seed/epoch state. Rejected calls leave the current sample order and progress unchanged. Checkpoints persist the chosen indices; callers retain/bind the weight policy and call this overload again for each subsequent weighted epoch.
References CTX_EXPORT.
| gzBool ctxBackpropTrainer::beginIndexedEpoch | ( | gzUInt32 | epoch, |
| const ctxIndex & | sampleOrder ) |
Install a prebuilt training-prefix order at an epoch boundary.
Requires non-sequential prepared training, no pending batch, and exactly getSubsetLength() indices below getSamples()-getValidations(). Invalid calls preserve selected indices, progress and parameter/optimizer banks. Checkpoints retain the order and batch cursor; bind/save the external generating policy separately. Automatic later epochs remain unweighted.
References CTX_EXPORT.
| gzUInt32 ctxBackpropTrainer::getBatchOffset | ( | ) | const |
References CTX_EXPORT.
| gzUInt32 ctxBackpropTrainer::getBatchSize | ( | ) | const |
References CTX_EXPORT.
|
virtual |
Implements ctxTrainer.
References CTX_EXPORT.
|
static |
References CTX_EXPORT.
| gzFloat ctxBackpropTrainer::getDropConnect | ( | ) | const |
References CTX_EXPORT.
| gzUInt32 ctxBackpropTrainer::getIteration | ( | ) | const |
References CTX_EXPORT.
| ctxOptimizer * ctxBackpropTrainer::getOptimizer | ( | ) | const |
References CTX_EXPORT.
|
virtual |
Implements ctxTrainer.
References CTX_EXPORT.
| gzUInt32 ctxBackpropTrainer::getSampleIndex | ( | gzUInt32 | page | ) | const |
References CTX_EXPORT.
| gzUInt32 ctxBackpropTrainer::getSamples | ( | ) | const |
References CTX_EXPORT.
| gzUInt32 ctxBackpropTrainer::getSubsetLength | ( | ) | const |
References CTX_EXPORT.
|
virtual |
Reimplemented from ctxTrainer.
| gzUInt32 ctxBackpropTrainer::getValidations | ( | ) | const |
References CTX_EXPORT.
|
virtual |
Implements ctxTrainer.
References CTX_EXPORT.
|
virtual |
Implements ctxTrainer.
References CTX_EXPORT.
|
virtual |
Implements ctxTrainer.
References CTX_EXPORT.
|
virtual |
Implements ctxTrainer.
References CTX_EXPORT.
| gzBool ctxBackpropTrainer::prepareNextBatch | ( | ) |
Prepare the next selected batch, without a parameter update.
References CTX_EXPORT.
|
virtual |
Implements ctxTrainer.
References CTX_EXPORT.
| gzBool ctxBackpropTrainer::setDropConnect | ( | gzFloat | probability | ) |
Set the training DropConnect probability for subsequent batches.
Requires a prepared session with no pending batch. The value must be finite and in [0, 1]; positive values require compiled mask slots. Preserves parameters, optimizer state, the current sample order and training progress. Checkpoints saved after the call use the new value.
References CTX_EXPORT.
| gzBool ctxBackpropTrainer::setOptimizer | ( | ctxOptimizer * | optimizer, |
| ctxOptimizerStatePolicy | statePolicy = CTX_OPTIMIZER_STATE_RESET ) |
References CTX_EXPORT, and CTX_OPTIMIZER_STATE_RESET.
|
virtual |
Reimplemented from ctxTrainer.
References CTX_EXPORT.
| gzBool ctxBackpropTrainer::trainPreparedBatch | ( | ) |
Train one prepared batch and commit its batch/epoch progress.
References CTX_EXPORT.
|
virtual |
Prepare and train the next bounded unit; Backprop consumes one batch.
Implements ctxTrainer.
References CTX_EXPORT.
|
friend |
Definition at line 243 of file ctxCortexTrainer.h.
References ctxBackpropTrainer(), and ctxModel.
Referenced by ctxModel.