Class MultiLayerConfiguration.Builder

    • Field Detail

      • dampingFactor

        protected double dampingFactor
      • tbpttFwdLength

        protected int tbpttFwdLength
      • tbpttBackLength

        protected int tbpttBackLength
      • trainingWorkspaceMode

        protected WorkspaceMode trainingWorkspaceMode
      • inferenceWorkspaceMode

        protected WorkspaceMode inferenceWorkspaceMode
      • validateOutputConfig

        protected boolean validateOutputConfig
      • validateTbpttConfig

        protected boolean validateTbpttConfig
      • overrideNinUponBuild

        protected boolean overrideNinUponBuild
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • overrideNinUponBuild

        public MultiLayerConfiguration.Builder overrideNinUponBuild​(boolean overrideNinUponBuild)
        Whether to over ride the nIn configuration forcibly upon construction. Default value is true
        Parameters:
        overrideNinUponBuild - Whether to over ride the nIn configuration forcibly upon construction.
        Returns:
        builder pattern
      • inputPreProcessor

        public MultiLayerConfiguration.Builder inputPreProcessor​(Integer layer,
                                                                 InputPreProcessor processor)
        Specify the processors. These are used at each layer for doing things like normalization and shaping of input.
        Parameters:
        processor - what to use to preProcess the data.
        Returns:
        builder pattern
      • cacheMode

        public MultiLayerConfiguration.Builder cacheMode​(@NonNull
                                                         @NonNull CacheMode cacheMode)
        This method defines how/if preOutput cache is handled: NONE: cache disabled (default value) HOST: Host memory will be used DEVICE: GPU memory will be used (on CPU backends effect will be the same as for HOST)
        Parameters:
        cacheMode -
        Returns:
      • backpropType

        public MultiLayerConfiguration.Builder backpropType​(@NonNull
                                                            @NonNull BackpropType type)
        The type of backprop. Default setting is used for most networks (MLP, CNN etc), but optionally truncated BPTT can be used for training recurrent neural networks. If using TruncatedBPTT make sure you set both tBPTTForwardLength() and tBPTTBackwardLength()
      • tBPTTForwardLength

        public MultiLayerConfiguration.Builder tBPTTForwardLength​(int forwardLength)
        When doing truncated BPTT: how many steps of forward pass should we do before doing (truncated) backprop?
        Only applicable when doing backpropType(BackpropType.TruncatedBPTT)
        Typically tBPTTForwardLength parameter is same as the tBPTTBackwardLength parameter, but may be larger than it in some circumstances (but never smaller)
        Ideally your training data time series length should be divisible by this This is the k1 parameter on pg23 of http://www.cs.utoronto.ca/~ilya/pubs/ilya_sutskever_phd_thesis.pdf
        Parameters:
        forwardLength - Forward length > 0, >= backwardLength
      • validateOutputLayerConfig

        public MultiLayerConfiguration.Builder validateOutputLayerConfig​(boolean validate)
        Enabled by default. If enabled, the output layer configuration will be validated, to throw an exception on likely invalid outputs - such as softmax + nOut=1, or LossMCXENT + Tanh.
        If disabled (false) no output layer validation will be performed.
        Disabling this validation is not recommended, as the configurations that fail validation usually will not be able to learn correctly. However, the option to disable this validation is provided for advanced users when creating non-standard architectures.
        Parameters:
        validate - If true: validate output layer configuration. False: don't validate
      • validateTbpttConfig

        public MultiLayerConfiguration.Builder validateTbpttConfig​(boolean validate)
        Enabled by default. If enabled, an exception will be throw when using the (invalid) combination of truncated backpropagation through time (TBPTT) with either a GlobalPoolingLayer or LastTimeStepLayer.
        It is possible to disable this validation to allow what is almost certainly an invalid configuration to be used, however this is not recommended.
        Parameters:
        validate - Whether TBPTT validation should be performed
      • dataType

        public MultiLayerConfiguration.Builder dataType​(@NonNull
                                                        @NonNull DataType dataType)
        Set the DataType for the network parameters and activations for all layers in the network. Default: Float
        Parameters:
        dataType - Datatype to use for parameters and activations