| 286 | } |
| 287 | |
| 288 | void get_support_classes(int* n_support, int n_class, SvmModel* model){ |
| 289 | SyncArray<int> n_sv(n_class); |
| 290 | n_sv.copy_from(model->get_n_sv()); |
| 291 | int* n_sv_ptr = n_sv.host_data(); |
| 292 | for(int i = 0; i < n_sv.size(); i++){ |
| 293 | n_support[i] = n_sv_ptr[i]; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | void get_coef(float* dual_coef, int n_class, int n_sv, SvmModel* model){ |
| 298 | SyncArray<float_type > coef((n_class - 1 ) * n_sv); |