🤖 AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.ml

クラス ANN_MLP


  • public class ANN_MLP extends StatModel
    ニューラルネットワーク - 多層パーセプトロン (Multi-Layer Perceptrons)。生成と学習が一度に行われるMLの他の多くのモデルとは異なり、MLPモデルではこれらの段階が分離されている。まず、指定したトポロジを持つネットワークを、非デフォルトのコンストラクタまたはメソッド ANN_MLP::create を使って生成する。すべての重みはゼロに設定される。次に、入力ベクトルと出力ベクトルの集合を使ってネットワークを学習させる。学習手続きは複数回繰り返すことができる。すなわち、新しい学習データに基づいて重みを調整できる。StatModel::train に対しては追加のフラグ ANN_MLP::TrainFlags が利用できる。SEE: REF: ml_intro_ann
    • コンストラクタの詳細

      • ANN_MLP

        protected ANN_MLP​(long addr)
    • メソッドの詳細

      • __fromPtr__

        public static ANN_MLP __fromPtr__​(long addr)
      • setTrainMethod

        public void setTrainMethod​(int method,
                                   double param1,
                                   double param2)
        Sets training method and common parameters.
        引数:
        method - デフォルト値は ANN_MLP::RPROP。ANN_MLP::TrainingMethods を参照。
        param1 - ANN_MLP::RPROP の場合は setRpropDW0 に、ANN_MLP::BACKPROP の場合は setBackpropWeightScale に、ANN_MLP::ANNEAL の場合は initialT に渡される。
        param2 - ANN_MLP::RPROP の場合は setRpropDWMin に、ANN_MLP::BACKPROP の場合は setBackpropMomentumScale に、ANN_MLP::ANNEAL の場合は finalT に渡される。
      • setTrainMethod

        public void setTrainMethod​(int method,
                                   double param1)
        Sets training method and common parameters.
        引数:
        method - デフォルト値は ANN_MLP::RPROP。ANN_MLP::TrainingMethods を参照。
        param1 - ANN_MLP::RPROP の場合は setRpropDW0 に、ANN_MLP::BACKPROP の場合は setBackpropWeightScale に、ANN_MLP::ANNEAL の場合は initialT に渡される。
      • setTrainMethod

        public void setTrainMethod​(int method)
        Sets training method and common parameters.
        引数:
        method - デフォルト値は ANN_MLP::RPROP。ANN_MLP::TrainingMethods を参照。
      • getTrainMethod

        public int getTrainMethod()
        Returns current training method
        戻り値:
        自動生成
      • setActivationFunction

        public void setActivationFunction​(int type,
                                          double param1,
                                          double param2)
        Initialize the activation function for each neuron. Currently the default and the only fully supported activation function is ANN_MLP::SIGMOID_SYM.
        引数:
        type - 活性化関数の種類。ANN_MLP::ActivationFunctions を参照。
        param1 - 活性化関数の第1引数、\(\alpha\)。デフォルト値は0。
        param2 - 活性化関数の第2引数、\(\beta\)。デフォルト値は0。
      • setActivationFunction

        public void setActivationFunction​(int type,
                                          double param1)
        Initialize the activation function for each neuron. Currently the default and the only fully supported activation function is ANN_MLP::SIGMOID_SYM.
        引数:
        type - 活性化関数の種類。ANN_MLP::ActivationFunctions を参照。
        param1 - 活性化関数の第1引数、\(\alpha\)。デフォルト値は0。
      • setActivationFunction

        public void setActivationFunction​(int type)
        Initialize the activation function for each neuron. Currently the default and the only fully supported activation function is ANN_MLP::SIGMOID_SYM.
        引数:
        type - 活性化関数の種類。ANN_MLP::ActivationFunctions を参照。
      • setLayerSizes

        public void setLayerSizes​(Mat _layer_sizes)
        Integer vector specifying the number of neurons in each layer including the input and output layers. The very first element specifies the number of elements in the input layer. The last element - number of elements in the output layer. Default value is empty Mat. SEE: getLayerSizes
        引数:
        _layer_sizes - 自動生成
      • getLayerSizes

        public Mat getLayerSizes()
        Integer vector specifying the number of neurons in each layer including the input and output layers. The very first element specifies the number of elements in the input layer. The last element - number of elements in the output layer. SEE: setLayerSizes
        戻り値:
        自動生成
      • getTermCriteria

        public TermCriteria getTermCriteria()
        SEE: setTermCriteria
        戻り値:
        自動生成
      • setTermCriteria

        public void setTermCriteria​(TermCriteria val)
        getTermCriteria SEE: getTermCriteria
        引数:
        val - 自動生成
      • getBackpropWeightScale

        public double getBackpropWeightScale()
        SEE: setBackpropWeightScale
        戻り値:
        自動生成
      • setBackpropWeightScale

        public void setBackpropWeightScale​(double val)
        getBackpropWeightScale SEE: getBackpropWeightScale
        引数:
        val - 自動生成
      • getBackpropMomentumScale

        public double getBackpropMomentumScale()
        SEE: setBackpropMomentumScale
        戻り値:
        自動生成
      • setBackpropMomentumScale

        public void setBackpropMomentumScale​(double val)
        getBackpropMomentumScale SEE: getBackpropMomentumScale
        引数:
        val - 自動生成
      • getRpropDW0

        public double getRpropDW0()
        SEE: setRpropDW0
        戻り値:
        自動生成
      • setRpropDW0

        public void setRpropDW0​(double val)
        getRpropDW0 SEE: getRpropDW0
        引数:
        val - 自動生成
      • getRpropDWPlus

        public double getRpropDWPlus()
        SEE: setRpropDWPlus
        戻り値:
        自動生成
      • setRpropDWPlus

        public void setRpropDWPlus​(double val)
        getRpropDWPlus SEE: getRpropDWPlus
        引数:
        val - 自動生成
      • getRpropDWMinus

        public double getRpropDWMinus()
        SEE: setRpropDWMinus
        戻り値:
        自動生成
      • setRpropDWMinus

        public void setRpropDWMinus​(double val)
        getRpropDWMinus SEE: getRpropDWMinus
        引数:
        val - 自動生成
      • getRpropDWMin

        public double getRpropDWMin()
        SEE: setRpropDWMin
        戻り値:
        自動生成
      • setRpropDWMin

        public void setRpropDWMin​(double val)
        getRpropDWMin SEE: getRpropDWMin
        引数:
        val - 自動生成
      • getRpropDWMax

        public double getRpropDWMax()
        SEE: setRpropDWMax
        戻り値:
        自動生成
      • setRpropDWMax

        public void setRpropDWMax​(double val)
        getRpropDWMax SEE: getRpropDWMax
        引数:
        val - 自動生成
      • getAnnealInitialT

        public double getAnnealInitialT()
        SEE: setAnnealInitialT
        戻り値:
        自動生成
      • setAnnealInitialT

        public void setAnnealInitialT​(double val)
        getAnnealInitialT SEE: getAnnealInitialT
        引数:
        val - 自動生成
      • getAnnealFinalT

        public double getAnnealFinalT()
        SEE: setAnnealFinalT
        戻り値:
        自動生成
      • setAnnealFinalT

        public void setAnnealFinalT​(double val)
        getAnnealFinalT SEE: getAnnealFinalT
        引数:
        val - 自動生成
      • getAnnealCoolingRatio

        public double getAnnealCoolingRatio()
        SEE: setAnnealCoolingRatio
        戻り値:
        自動生成
      • setAnnealCoolingRatio

        public void setAnnealCoolingRatio​(double val)
        getAnnealCoolingRatio SEE: getAnnealCoolingRatio
        引数:
        val - 自動生成
      • getAnnealItePerStep

        public int getAnnealItePerStep()
        SEE: setAnnealItePerStep
        戻り値:
        自動生成
      • setAnnealItePerStep

        public void setAnnealItePerStep​(int val)
        getAnnealItePerStep SEE: getAnnealItePerStep
        引数:
        val - 自動生成
      • getWeights

        public Mat getWeights​(int layerIdx)
      • create

        public static ANN_MLP create()
        Creates empty model Use StatModel::train to train the model, Algorithm::load<ANN_MLP>(filename) to load the pre-trained model. Note that the train method has optional flags: ANN_MLP::TrainFlags.
        戻り値:
        自動生成
      • load

        public static ANN_MLP load​(java.lang.String filepath)
        Loads and creates a serialized ANN from a file Use ANN::save to serialize and store an ANN to disk. Load the ANN from this file again, by calling this function with the path to the file.
        引数:
        filepath - シリアライズされたANNへのパス
        戻り値:
        自動生成