Implement GPU predict leaf. (#6187)
This commit is contained in:
@@ -147,9 +147,7 @@ class GBLinear : public GradientBooster {
|
||||
}
|
||||
}
|
||||
|
||||
void PredictLeaf(DMatrix*,
|
||||
std::vector<bst_float>*,
|
||||
unsigned) override {
|
||||
void PredictLeaf(DMatrix *, HostDeviceVector<bst_float> *, unsigned) override {
|
||||
LOG(FATAL) << "gblinear does not support prediction of leaf index";
|
||||
}
|
||||
|
||||
|
||||
@@ -278,10 +278,9 @@ class GBTree : public GradientBooster {
|
||||
}
|
||||
|
||||
void PredictLeaf(DMatrix* p_fmat,
|
||||
std::vector<bst_float>* out_preds,
|
||||
HostDeviceVector<bst_float>* out_preds,
|
||||
unsigned ntree_limit) override {
|
||||
CHECK(configured_);
|
||||
cpu_predictor_->PredictLeaf(p_fmat, out_preds, model_, ntree_limit);
|
||||
this->GetPredictor()->PredictLeaf(p_fmat, out_preds, model_, ntree_limit);
|
||||
}
|
||||
|
||||
void PredictContribution(DMatrix* p_fmat,
|
||||
|
||||
Reference in New Issue
Block a user