Interface TrainerContext

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Trainer create​(String uuid, int threadId, org.deeplearning4j.nn.api.Model model, int rootDevice, boolean useMDS, ParallelWrapper wrapper, org.deeplearning4j.nn.conf.WorkspaceMode workspaceMode, int averagingFrequency)
      Create a Trainer based on the given parameters
      void finalizeRound​(org.deeplearning4j.nn.api.Model originalModel, org.deeplearning4j.nn.api.Model... models)
      This method is called at averagingFrequency
      void finalizeTraining​(org.deeplearning4j.nn.api.Model originalModel, org.deeplearning4j.nn.api.Model... models)
      This method is called
      void init​(org.deeplearning4j.nn.api.Model model, Object... args)
      Initialize the context
    • Method Detail

      • init

        void init​(org.deeplearning4j.nn.api.Model model,
                  Object... args)
        Initialize the context
        Parameters:
        model -
        args - the arguments to initialize with (maybe null)
      • create

        Trainer create​(String uuid,
                       int threadId,
                       org.deeplearning4j.nn.api.Model model,
                       int rootDevice,
                       boolean useMDS,
                       ParallelWrapper wrapper,
                       org.deeplearning4j.nn.conf.WorkspaceMode workspaceMode,
                       int averagingFrequency)
        Create a Trainer based on the given parameters
        Parameters:
        threadId - the thread id to use for this worker
        model - the model to start the trainer with
        rootDevice - the root device id
        useMDS - whether to use MultiDataSet or DataSet or not
        wrapper - the wrapper instance to use with this trainer (this refernece is needed for coordination with the ParallelWrapper 's TrainingListener
        Returns:
        the created training instance
      • finalizeRound

        void finalizeRound​(org.deeplearning4j.nn.api.Model originalModel,
                           org.deeplearning4j.nn.api.Model... models)
        This method is called at averagingFrequency
        Parameters:
        originalModel -
        models -
      • finalizeTraining

        void finalizeTraining​(org.deeplearning4j.nn.api.Model originalModel,
                              org.deeplearning4j.nn.api.Model... models)
        This method is called
        Parameters:
        originalModel -
        models -