load/save neural net from xml file
i have developed neural network for my facial recognition application ..first i saved my network ..after training using (let say my network object is "neuron") neuron->save("neuron.xml");...further i modified my prgram so that is ignores training program and directly load pre-trained neural config.form "neuron.xml"...
I did:
Ptr<ANN_MLP>neuron=ANN_MLP::loadFromString<ANN_MLP>("neuron.xml");
which encounters ther pharasing error as follows::
OpenCV Error: Parsing error ((null)(1): Valid XML should start with '<?xml ...?>') in icvXMLParse, file C:\builds\master_PackSlave-win64-vc11-shared\opencv\modules\core\src\persistence.cpp, line 2220
i checked the xml file.It started with <?xml version="1.0"?>
what could be the mess??
Thank you