Class RBM.RBMBuilder

  • Enclosing class:
    RBM

    public static class RBM.RBMBuilder
    extends java.lang.Object
    • Method Detail

      • trainingType

        public RBM.RBMBuilder trainingType​(TrainingType type)
        Sets the training type, it defaults to CPU- so only use if you want to use the GPU.
      • lambda

        public RBM.RBMBuilder lambda​(double lambda)
        Sets the regularization parameter lambda, defaults to 0 if not set.
      • miniBatchSize

        public RBM.RBMBuilder miniBatchSize​(int size)
        Parameters:
        size - the minibatch size to use. Batches are calculated in parallel on every cpu core if not overridden by batchParallelism(int).
      • batchParallelism

        public RBM.RBMBuilder batchParallelism​(int numThreads)
        Parameters:
        numThreads - set the number of threads where batches should be calculated in parallel.
      • verbose

        public RBM.RBMBuilder verbose()
        Sets verbose to true. Progress indicators will be printed to STDOUT.
      • stochastic

        public RBM.RBMBuilder stochastic()
        Sets the training mode to stochastic.
      • stochastic

        public RBM.RBMBuilder stochastic​(boolean stochastic)
        If verbose is true, stochastic training will be used.
      • verbose

        public RBM.RBMBuilder verbose​(boolean verbose)
        If verbose is true, progress indicators will be printed to STDOUT.
      • create

        public static RBM.RBMBuilder create​(ActivationFunction activation,
                                            int... layer)
        Creates a new RBM.RBMBuilder from an activation function and layersizes.
        Parameters:
        activation - the activation function.
        layer - an array of hidden layer sizes.
        Returns:
        a new RBM builder.
      • build

        public RBM build()
        Returns:
        a new RBM with the given configuration.