1 | initial version |
Here is a basic code C++ to solve the XOR problem using ANN_MLP:
https://github.com/sjhalayka/opencv_xor/blob/master/main.cpp
Here is the source code that performs the setLayerSizes
function:
https://github.com/opencv/opencv/blob/9787ab598b6609a6ca6652a12441d741cb15f695/modules/ml/src/ann_mlp.cpp#L309
So it looks there is no set maximum number of layers, nor is there a maximum for each layer -- it's only what your RAM can handle.
2 | No.2 Revision |
Here is a basic code C++ to solve the XOR problem using ANN_MLP:
https://github.com/sjhalayka/opencv_xor/blob/master/main.cpp
Here is the source code that performs the setLayerSizes
function:
https://github.com/opencv/opencv/blob/9787ab598b6609a6ca6652a12441d741cb15f695/modules/ml/src/ann_mlp.cpp#L309
So it looks there is no set maximum number of layers, nor is there a maximum for each layer -- it's only what your RAM can handle.
Here is the source code that performs setTermCriteria
:
https://github.com/opencv/opencv/blob/9787ab598b6609a6ca6652a12441d741cb15f695/modules/ml/src/ann_mlp.cpp#L158
It looks like the maximum number of training sessions is 1000:
https://github.com/opencv/opencv/blob/9787ab598b6609a6ca6652a12441d741cb15f695/modules/ml/src/ann_mlp.cpp#L849
3 | No.3 Revision |
Here is a basic code C++ to solve the XOR problem using ANN_MLP:
https://github.com/sjhalayka/opencv_xor/blob/master/main.cpp
Here is the source code that performs the setLayerSizes
function:
https://github.com/opencv/opencv/blob/9787ab598b6609a6ca6652a12441d741cb15f695/modules/ml/src/ann_mlp.cpp#L309
So it looks there is no set maximum number of layers, nor is there a maximum number of neurons for each layer -- it's only what your RAM can handle.
Here is the source code that performs setTermCriteria
:
https://github.com/opencv/opencv/blob/9787ab598b6609a6ca6652a12441d741cb15f695/modules/ml/src/ann_mlp.cpp#L158
It looks like the maximum number of training sessions is 1000:
https://github.com/opencv/opencv/blob/9787ab598b6609a6ca6652a12441d741cb15f695/modules/ml/src/ann_mlp.cpp#L849
4 | No.4 Revision |
Here is a basic code C++ to solve the XOR problem using ANN_MLP:
https://github.com/sjhalayka/opencv_xor/blob/master/main.cpp
Here is the source code that performs the setLayerSizes
function:
https://github.com/opencv/opencv/blob/9787ab598b6609a6ca6652a12441d741cb15f695/modules/ml/src/ann_mlp.cpp#L309
So it looks there is no set maximum number of layers, nor is there a set maximum number of neurons for each layer -- it's only what your RAM can handle.
Here is the source code that performs setTermCriteria
:
https://github.com/opencv/opencv/blob/9787ab598b6609a6ca6652a12441d741cb15f695/modules/ml/src/ann_mlp.cpp#L158
It looks like the maximum number of training sessions is 1000:
https://github.com/opencv/opencv/blob/9787ab598b6609a6ca6652a12441d741cb15f695/modules/ml/src/ann_mlp.cpp#L849