Propagators
These propagate Batches sampled from a DataSet using a Sampler through a Module in order to evaluate a Loss, provide Feedback or train the model :
- Propagator : abstract class;
Propagator
Abstract Class for propagating a sampling distribution (a Sampler) through a Module. A Propagator can be sub-classed to build task-tailored training or evaluation algorithms.
dp.Propagator{...}
A Propagator constructor which takes key-value arguments:
loss
is a Criterion which the Model output will need to evaluate or minimize.callback
is a user-defined function(model, report) that does things like update themodel
parameters, gather statistics, decay learning rate, etc.epoch_callback
is a user-defined function(model, report) that is called between epochs. Typically used for learning rate decay and such;sampler
is, you guessed it, a Sampler instance which iterates through a DataSet. Defaults todp.Sampler()
observer
is an Observer instance that is informed when an event occurs.feedback
is a Feedback instance that takes Model input, output and targets as input to provide I/O feedback to the user or system.progress
is a boolean that, when true, displays the progress of examples seen in the epoch. Defaults tofalse
.stats
is a boolean for displaying statistics. Defaults tofalse
.
Optimizer
Optimizes a Module on a train
DataSet.
Evaluator
Evaluates a Model on a valid
or test
DataSet.