MCPcopy Create free account
hub / github.com/davisking/dlib / solve_structural_svm_problem

Function solve_structural_svm_problem

tools/python/src/svm_struct.cpp:128–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126// ----------------------------------------------------------------------------------------
127
128matrix<double,0,1> solve_structural_svm_problem(
129 py::object problem
130)
131{
132 // Check if the python code is using sparse or dense vectors to represent PSI()
133 if (py::isinstance<matrix<double,0,1>>(problem.attr("get_truth_joint_feature_vector")(0)))
134 return solve_structural_svm_problem_impl<matrix<double,0,1> >(problem);
135 else
136 return solve_structural_svm_problem_impl<std::vector<std::pair<unsigned long,double> > >(problem);
137}
138
139// ----------------------------------------------------------------------------------------
140

Callers

nothing calls this directly

Calls 1

attrMethod · 0.80

Tested by

no test coverage detected