| 281 | } |
| 282 | |
| 283 | void LearnerModelParam::Copy(LearnerModelParam const& that) { |
| 284 | base_score_.Reshape(that.base_score_.Shape()); |
| 285 | base_score_.Data()->SetDevice(that.base_score_.Device()); |
| 286 | base_score_.Data()->Copy(*that.base_score_.Data()); |
| 287 | std::as_const(base_score_).HostView(); |
| 288 | if (!that.base_score_.Device().IsCPU()) { |
| 289 | std::as_const(base_score_).View(that.base_score_.Device()); |
| 290 | } |
| 291 | CHECK_EQ(base_score_.Data()->DeviceCanRead(), that.base_score_.Data()->DeviceCanRead()); |
| 292 | CHECK(base_score_.Data()->HostCanRead()); |
| 293 | |
| 294 | num_feature = that.num_feature; |
| 295 | num_output_group = that.num_output_group; |
| 296 | task = that.task; |
| 297 | multi_strategy = that.multi_strategy; |
| 298 | } |
| 299 | |
| 300 | struct LearnerTrainParam : public XGBoostParameter<LearnerTrainParam> { |
| 301 | // flag to disable default metric |