public class ParameterServerTrainerContext extends java.lang.Object implements TrainerContext
ParallelWrapper
with ParameterServerTrainer workers.| Constructor and Description |
|---|
ParameterServerTrainerContext() |
| 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 TrainerContextmodel - 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 TrainerContextthreadId - 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