added wrapped load function for python as suggested by gat3way

This commit is contained in:
Christoph Spörk
2016-01-11 10:59:15 +01:00
parent 66eda72f66
commit 3f172731b2
2 changed files with 23 additions and 1 deletions

View File

@@ -1317,6 +1317,18 @@ Ptr<ANN_MLP> ANN_MLP::create()
return makePtr<ANN_MLPImpl>();
}
}}
Ptr<ANN_MLP> ANN_MLP::load(const String& filepath)
{
FileStorage fs;
fs.open(filepath, FileStorage::READ);
Ptr<ANN_MLP> ann = makePtr<ANN_MLPImpl>();
((ANN_MLPImpl*)ann.get())->read(fs.getFirstTopLevelNode());
return ann;
}
}}
/* End of file. */