Ask Your Question

Neural network training in C usage in C++ is possible?

asked 2013-02-23 10:22:51 -0500

updated 2013-02-23 10:27:20 -0500

rics gravatar image

what happen to trained Neural network implemented in c with opencv if execution of program is over? can we use same trained network again if we run that code again ? if not... how can we do that ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-02-23 11:27:21 -0500

berak gravatar image

updated 2013-02-23 11:30:55 -0500

sure, you can!

CvANN_MLP mlp ;
mlp.train ( trainingData , trainingClasses );
// now save it:
cv::FileStorage fs("mlp.yml", cv::FileStorage::WRITE);
mlp.write(*fs, "ann"); 
// "ann" is the name of the node here, you can choose anything you like,
// as long as it's consistent with the one below, when reading


CvANN_MLP mlp ;
// read it back:
// now you can run your prediction as usual
edit flag offensive delete link more

Question Tools


Asked: 2013-02-23 10:22:51 -0500

Seen: 506 times

Last updated: Feb 23 '13