Class AbstractSameDiffLayer.Builder<T extends AbstractSameDiffLayer.Builder<T>>

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • l1

        public T l1​(double l1)
        L1 regularization coefficient (weights only). Use l1Bias(double) to configure the l1 regularization coefficient for the bias.
      • l1Bias

        public T l1Bias​(double l1Bias)
        L1 regularization coefficient for the bias. Default: 0. See also l1(double)
      • weightDecay

        public AbstractSameDiffLayer.Builder weightDecay​(double coefficient)
        Add weight decay regularization for the network parameters (excluding biases).
        This applies weight decay with multiplying the learning rate - see WeightDecay for more details.
        Parameters:
        coefficient - Weight decay regularization coefficient
        See Also:
        weightDecay(double, boolean)
      • weightDecay

        public AbstractSameDiffLayer.Builder weightDecay​(double coefficient,
                                                         boolean applyLR)
        Add weight decay regularization for the network parameters (excluding biases). See WeightDecay for more details.
        Parameters:
        coefficient - Weight decay regularization coefficient
        applyLR - Whether the learning rate should be multiplied in when performing weight decay updates. See WeightDecay for more details.
        See Also:
        weightDecay(double, boolean)
      • weightDecayBias

        public AbstractSameDiffLayer.Builder weightDecayBias​(double coefficient,
                                                             boolean applyLR)
        Weight decay for the biases only - see weightDecay(double) for more details
        Parameters:
        coefficient - Weight decay regularization coefficient
      • regularization

        public AbstractSameDiffLayer.Builder regularization​(List<Regularization> regularization)
        Set the regularization for the parameters (excluding biases) - for example WeightDecay
        Parameters:
        regularization - Regularization to apply for the network parameters/weights (excluding biases)
      • updater

        public T updater​(IUpdater updater)
        Gradient updater. For example, Adam or Nesterovs
        Parameters:
        updater - Updater to use
      • biasUpdater

        public T biasUpdater​(IUpdater biasUpdater)
        Gradient updater configuration, for the biases only. If not set, biases will use the updater as set by updater(IUpdater)
        Parameters:
        biasUpdater - Updater to use for bias parameters