Commit e6470b33 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Solved more memory leaks. PLDA is the only missing to check

parent 6ffaff25
......@@ -78,6 +78,9 @@ static int PyBobLearnEMMAPGMMTrainer_init_base_trainer(PyBobLearnEMMAPGMMTrainer
PyObject* keyword_relevance_factor = Py_BuildValue("s", kwlist1[1]);
PyObject* keyword_alpha = Py_BuildValue("s", kwlist2[1]);
auto keyword_relevance_factor_ = make_safe(keyword_relevance_factor);
auto keyword_alpha_ = make_safe(keyword_alpha);
//Here we have to select which keyword argument to read
if (kwargs && PyDict_Contains(kwargs, keyword_relevance_factor) && (PyArg_ParseTupleAndKeywords(args, kwargs, "O!dO!|O!O!d", kwlist1,
&PyBobLearnEMGMMMachine_Type, &gmm_machine,
......
......@@ -302,7 +302,7 @@ PyObject* PyBobLearnEMIVectorMachine_getUBM(PyBobLearnEMIVectorMachineObject* se
(PyBobLearnEMGMMMachineObject*)PyBobLearnEMGMMMachine_Type.tp_alloc(&PyBobLearnEMGMMMachine_Type, 0);
retval->cxx = ubm_gmmMachine;
return Py_BuildValue("O",retval);
return Py_BuildValue("N",retval);
BOB_CATCH_MEMBER("ubm could not be read", 0)
}
int PyBobLearnEMIVectorMachine_setUBM(PyBobLearnEMIVectorMachineObject* self, PyObject* value, void*){
......
......@@ -535,7 +535,7 @@ static PyObject* PyBobLearnEMKMeansMachine_get_variances_and_weights_for_each_cl
self->cxx->getVariancesAndWeightsForEachCluster(*PyBlitzArrayCxx_AsBlitz<double,2>(input),variances,weights);
return Py_BuildValue("(O,O)",PyBlitzArrayCxx_AsConstNumpy(variances), PyBlitzArrayCxx_AsConstNumpy(weights));
return Py_BuildValue("(N,N)",PyBlitzArrayCxx_AsConstNumpy(variances), PyBlitzArrayCxx_AsConstNumpy(weights));
BOB_CATCH_MEMBER("cannot compute the variances and weights for each cluster", 0)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment