Class MaxNormConstraint

    • Constructor Detail

      • MaxNormConstraint

        public MaxNormConstraint​(double maxNorm,
                                 Set<String> paramNames,
                                 int... dimensions)
        Parameters:
        maxNorm - Maximum L2 value
        paramNames - Which parameter names to apply constraint to
        dimensions - Dimensions to apply to. For DenseLayer, OutputLayer, RnnOutputLayer, LSTM, etc: this should be dimension 1. For CNNs, this should be dimensions [1,2,3] corresponding to last 3 of parameters which have order [depthOut, depthIn, kH, kW]
      • MaxNormConstraint

        public MaxNormConstraint​(double maxNorm,
                                 int... dimensions)
        Apply to weights but not biases by default
        Parameters:
        maxNorm - Maximum L2 value
        dimensions - Dimensions to apply to. For DenseLayer, OutputLayer, RnnOutputLayer, LSTM, etc: this should be dimension 1. For CNNs, this should be dimensions [1,2,3] corresponding to last 3 of parameters which have order [depthOut, depthIn, kH, kW]