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

Function add_linear_df

tools/python/src/decision_functions.cpp:273–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271
272template <typename kernel_type>
273void add_linear_df (
274 py::module &m,
275 const std::string name
276)
277{
278 typedef decision_function<kernel_type> df_type;
279 py::class_<df_type>(m, name.c_str())
280 .def("__call__", predict<df_type>)
281 .def_property_readonly("weights", &get_weights<df_type>)
282 .def_property("bias", get_bias<df_type>, set_bias<df_type>)
283 .def(py::pickle(&getstate<df_type>, &setstate<df_type>));
284}
285
286// ----------------------------------------------------------------------------------------
287

Callers

nothing calls this directly

Calls 1

pickleFunction · 0.85

Tested by

no test coverage detected