When using the dlib library following the example example :

typedef matrix<double,1,1> sample_type; typedef radial_basis_kernel<sample_type> kernel_type; krls<kernel_type> test(kernel_type(0.1),0.001); 

serialize and save the trained decision_function of the test model to the database (not to a file, as in the example):

 std::ostream out; decision_function<kernel_type> func = test.get_decision_function(); dlib::serialize( func, out ); ... 褋芯褏褉邪薪械薪懈械 胁 斜邪蟹褍 ... 

Then we try to deserialize the decision_function. And now the question: how to assign a deserialized decision_function of an existing model? Well, or create a new model based on the existing trained function ?!

 std::istringstream str(std::ios::binary); ... decision_function<kernel_type> func = test.get_decision_function(); dlib::deserialize( func, str ); // 袣袗袣 袧袗袟袧袗效袠孝鞋 小校些袝小孝袙校挟些袝袡 袦袨袛袝袥袠 袧袨袙校挟 decision_function?? krls.set_decision_function(func); // NO EXISTING METHOD!!! 

    0