Package samer.models
Class DiffScaler.ScaleTrainer
- java.lang.Object
-
- samer.tools.AnonymousTask
-
- samer.models.DiffScaler.ScaleTrainer
-
- All Implemented Interfaces:
- Model.Trainer, Task
- Enclosing class:
- DiffScaler
public class DiffScaler.ScaleTrainer extends AnonymousTask implements Model.Trainer
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ScaleTrainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
accumulate()
collect statistics for parameter updatevoid
accumulate(double w)
weighted accumulatevoid
dispose()
void
flush()
use collected stats to update parameters and resetVDouble
getScaleRate()
VDouble
getStretchRate()
void
oneshot()
Must be equivalent to reset(); accumulate(); flush(); but can be optimised for non-batched trainingvoid
reset()
reset accumulators without updating parametersvoid
run()
void
starting()
java.lang.String
toString()
-
Methods inherited from class samer.tools.AnonymousTask
stopping
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getScaleRate
public VDouble getScaleRate()
-
getStretchRate
public VDouble getStretchRate()
-
reset
public void reset()
Description copied from interface:Model.Trainer
reset accumulators without updating parameters- Specified by:
reset
in interfaceModel.Trainer
-
accumulate
public void accumulate()
Description copied from interface:Model.Trainer
collect statistics for parameter update- Specified by:
accumulate
in interfaceModel.Trainer
-
accumulate
public void accumulate(double w)
Description copied from interface:Model.Trainer
weighted accumulate- Specified by:
accumulate
in interfaceModel.Trainer
-
flush
public void flush()
Description copied from interface:Model.Trainer
use collected stats to update parameters and reset- Specified by:
flush
in interfaceModel.Trainer
-
oneshot
public void oneshot()
Description copied from interface:Model.Trainer
Must be equivalent to reset(); accumulate(); flush(); but can be optimised for non-batched training- Specified by:
oneshot
in interfaceModel.Trainer
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceModel.Trainer
- Specified by:
dispose
in interfaceTask
- Overrides:
dispose
in classAnonymousTask
-
starting
public void starting()
- Specified by:
starting
in interfaceTask
- Overrides:
starting
in classAnonymousTask
-
-