org.opencv.ml

## Class ANN_MLP

- java.lang.Object
- - org.opencv.core.Algorithm
  - - org.opencv.ml.StatModel
    - - org.opencv.ml.ANN_MLP

-     public class ANN_MLP
      extends StatModel

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BACKPROP`
    `static int` | `GAUSSIAN`
    `static int` | `IDENTITY`
    `static int` | `NO_INPUT_SCALE`
    `static int` | `NO_OUTPUT_SCALE`
    `static int` | `RPROP`
    `static int` | `SIGMOID_SYM`
    `static int` | `UPDATE_WEIGHTS`

    - ### Fields inherited from class org.opencv.ml.StatModel

      `COMPRESSED_INPUT, PREPROCESSED_INPUT, RAW_OUTPUT, UPDATE_MODEL`

    - ### Fields inherited from class org.opencv.core.Algorithm

      `nativeObj`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ANN_MLP(long addr)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ANN_MLP` | `create()`
    `protected void` | `finalize()`
    `double` | `getBackpropMomentumScale()`
    `double` | `getBackpropWeightScale()`
    `Mat` | `getLayerSizes()`
    `double` | `getRpropDW0()`
    `double` | `getRpropDWMax()`
    `double` | `getRpropDWMin()`
    `double` | `getRpropDWMinus()`
    `double` | `getRpropDWPlus()`
    `TermCriteria` | `getTermCriteria()`
    `int` | `getTrainMethod()`
    `Mat` | `getWeights(int layerIdx)`
    `static ANN_MLP` | `load(java.lang.String filepath)`
    `void` | `setActivationFunction(int type)`
    `void` | `setActivationFunction(int type, double param1, double param2)`
    `void` | `setBackpropMomentumScale(double val)`
    `void` | `setBackpropWeightScale(double val)`
    `void` | `setLayerSizes(Mat _layer_sizes)`
    `void` | `setRpropDW0(double val)`
    `void` | `setRpropDWMax(double val)`
    `void` | `setRpropDWMin(double val)`
    `void` | `setRpropDWMinus(double val)`
    `void` | `setRpropDWPlus(double val)`
    `void` | `setTermCriteria(TermCriteria val)`
    `void` | `setTrainMethod(int method)`
    `void` | `setTrainMethod(int method, double param1, double param2)`

    - ### Methods inherited from class org.opencv.ml.StatModel

      `calcError, empty, getVarCount, isClassifier, isTrained, predict, predict, train, train, train`

    - ### Methods inherited from class org.opencv.core.Algorithm

      `clear, getDefaultName, save`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BACKPROP

          public static final int BACKPROP

      See Also:
        Constant Field Values

    - #### RPROP

          public static final int RPROP

      See Also:
        Constant Field Values

    - #### IDENTITY

          public static final int IDENTITY

      See Also:
        Constant Field Values

    - #### SIGMOID_SYM

          public static final int SIGMOID_SYM

      See Also:
        Constant Field Values

    - #### GAUSSIAN

          public static final int GAUSSIAN

      See Also:
        Constant Field Values

    - #### UPDATE_WEIGHTS

          public static final int UPDATE_WEIGHTS

      See Also:
        Constant Field Values

    - #### NO_INPUT_SCALE

          public static final int NO_INPUT_SCALE

      See Also:
        Constant Field Values

    - #### NO_OUTPUT_SCALE

          public static final int NO_OUTPUT_SCALE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ANN_MLP

          protected ANN_MLP(long addr)

  - ### Method Detail

    - #### getLayerSizes

          public Mat getLayerSizes()

    - #### getWeights

          public Mat getWeights(int layerIdx)

    - #### create

          public static ANN_MLP create()

    - #### load

          public static ANN_MLP load(java.lang.String filepath)

    - #### getTermCriteria

          public TermCriteria getTermCriteria()

    - #### getBackpropMomentumScale

          public double getBackpropMomentumScale()

    - #### getBackpropWeightScale

          public double getBackpropWeightScale()

    - #### getRpropDW0

          public double getRpropDW0()

    - #### getRpropDWMax

          public double getRpropDWMax()

    - #### getRpropDWMin

          public double getRpropDWMin()

    - #### getRpropDWMinus

          public double getRpropDWMinus()

    - #### getRpropDWPlus

          public double getRpropDWPlus()

    - #### getTrainMethod

          public int getTrainMethod()

    - #### setActivationFunction

          public void setActivationFunction(int type,
                                            double param1,
                                            double param2)

    - #### setActivationFunction

          public void setActivationFunction(int type)

    - #### setBackpropMomentumScale

          public void setBackpropMomentumScale(double val)

    - #### setBackpropWeightScale

          public void setBackpropWeightScale(double val)

    - #### setLayerSizes

          public void setLayerSizes(Mat _layer_sizes)

    - #### setRpropDW0

          public void setRpropDW0(double val)

    - #### setRpropDWMax

          public void setRpropDWMax(double val)

    - #### setRpropDWMin

          public void setRpropDWMin(double val)

    - #### setRpropDWMinus

          public void setRpropDWMinus(double val)

    - #### setRpropDWPlus

          public void setRpropDWPlus(double val)

    - #### setTermCriteria

          public void setTermCriteria(TermCriteria val)

    - #### setTrainMethod

          public void setTrainMethod(int method,
                                     double param1,
                                     double param2)

    - #### setTrainMethod

          public void setTrainMethod(int method)

    - #### finalize

          protected void finalize()
                           throws java.lang.Throwable

      Overrides:
        `finalize` in class `StatModel`
      Throws:
        `java.lang.Throwable`