opencv_contrib icon indicating copy to clipboard operation
opencv_contrib copied to clipboard

ANN_MLP GetParams returns default values

Open opencv-pushbot opened this issue 9 years ago • 0 comments

Transferred from http://code.opencv.org/issues/4094

|| Bruno Nascimento on 2015-01-02 15:11
|| Priority: Low
|| Affected: branch 'master' (3.0-dev)
|| Category: ml
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Windows

ANN_MLP GetParams returns default values

ANN_MLP::Params params = m_classifier->getParams(); 
returns default params, even m_classifier is already loaded

History

Bruno Nascimento on 2015-01-02 17:19
layers size is not being retrived correctly you should consider to add on "ann_mlp.cpp" function "void read( const FileNode& fn )" something like:

params.layerSizes = Mat_<int>(_layer_sizes, true); 

after read_params(fn);

-   Status changed from New to Incomplete
Maksim Shabunin on 2015-04-27 09:12
-   Target version changed from 3.0-beta to 3.0
Maksim Shabunin on 2015-04-27 10:22
Can not reproduce with the latest master branch:

<pre>
Ptr<ANN_MLP> ann = ANN_MLP::create();
ann->setLayerSizes(layer_sizes);
ann->save(fname);
cout << "Set " << ann->getLayerSizes() << endl;

Ptr<ANN_MLP> new_ann = Algorithm::load<ANN_MLP>(fname);
cout << "Get " << new_ann->getLayerSizes() << endl;
</pre>
Layer sizes are read correctly.

Can you, please, check it again?
-   Target version changed from 3.0 to 3.1
-   Priority changed from Normal to Low
-   Assignee set to Maksim Shabunin
-   Category set to ml

opencv-pushbot avatar Jul 27 '15 11:07 opencv-pushbot