public class DefaultTrainerContext extends java.lang.Object implements TrainerContext
DefaultTrainer
instances for use with ParallelWrapper
Constructor and Description |
---|
DefaultTrainerContext() |
Modifier and Type | Method and Description |
---|---|
Trainer |
create(int threadId,
Model model,
int rootDevice,
boolean useMDS,
ParallelWrapper wrapper)
Create a
Trainer
based on the given parameters |
void |
init(Model model,
java.lang.Object... args)
Initialize the context
|
public void init(Model model, java.lang.Object... args)
init
in interface TrainerContext
model
- args
- the arguments to initialize with (maybe null)public Trainer create(int threadId, Model model, int rootDevice, boolean useMDS, ParallelWrapper wrapper)
Trainer
based on the given parameterscreate
in interface TrainerContext
threadId
- the thread id to use for this workermodel
- the model to start the trainer withrootDevice
- the root device iduseMDS
- whether to use the MagicQueue
or notwrapper
- the wrapper instance to use with this trainer (this refernece is needed
for coordination with the ParallelWrapper
's IterationListener