Multi-class SVM: predict_class_and_scores is failing
Created by: khoury
The function "predict_class_and_scores" in the SVM Machine is failing for Multi-Class SVM (segmentation fault) while you iterate over many probes. However, "predict class" alone is working fine. (https://github.com/idiap/bob/blob/master/src/machine/python/svm.cc) This is not working:
import bob
machine=bob.machine.SupportVector(bob.io.HDF5File('svm.hdf5'))
probe = bob.io.load('probe.hdf5').flatten()
cl, score = machine.predict_class_and_scores(probe)
cl, score = machine.predict_class_and_scores(probe)
However, this one is working:
import bob
machine=bob.machine.SupportVector(bob.io.HDF5File('svm.hdf5'))
probe = bob.io.load('probe.hdf5').flatten()
cl = machine.predict_class(probe)
cl = machine.predict_class(probe)
To reproduce the error, you can find the SVM machine [here] (http://www.elie-khoury.fr/svm.hdf5), and a probe file [here] (http://www.elie-khoury.fr/probe.hdf5).
Thanks,