Package samer.models
Class BatchedTrainer
- java.lang.Object
-
- samer.tools.AnonymousTask
-
- samer.models.BatchedTrainer
-
- All Implemented Interfaces:
- Task
public class BatchedTrainer extends AnonymousTask
Manages a Model.Trainer to do batched learning. Calls accumulate() each iteration Flushes everyiterations. Calls reset() on starting() - See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BatchedTrainer(Model.Trainer T)
BatchedTrainer(Model.Trainer T, int b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
dispose()
VInteger
getBatch()
Task
getPostFlush()
Task
getPreFlush()
Model.Trainer
getTrainer()
void
run()
void
setBatch(int n)
void
setPostFlush(Task t)
void
setPreFlush(Task t)
void
starting()
void
stopping()
java.lang.String
toString()
-
-
-
Constructor Detail
-
BatchedTrainer
public BatchedTrainer(Model.Trainer T)
-
BatchedTrainer
public BatchedTrainer(Model.Trainer T, int b)
-
-
Method Detail
-
getTrainer
public Model.Trainer getTrainer()
-
setBatch
public void setBatch(int n)
-
getBatch
public VInteger getBatch()
-
setPostFlush
public void setPostFlush(Task t)
-
getPostFlush
public Task getPostFlush()
-
setPreFlush
public void setPreFlush(Task t)
-
getPreFlush
public Task getPreFlush()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceTask
- Overrides:
dispose
in classAnonymousTask
-
starting
public void starting()
- Specified by:
starting
in interfaceTask
- Overrides:
starting
in classAnonymousTask
-
stopping
public void stopping()
- Specified by:
stopping
in interfaceTask
- Overrides:
stopping
in classAnonymousTask
-
run
public void run() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-