I have saved the knn model successfully using knn->save("file.yml").. But cannot seem to load the model using knn->load("file.yml")... Is something wring with the formatting of the load command??
Help appreciated..
Use this code
Ptr<KNearest> svm = Algorithm::load<KNearest>("treino.knn");
or
Ptr<KNearest> svm = KNearest::load<KNearest>("treino.knn");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.