Removed unnecessary PredictBatch calls (#6700)
Co-authored-by: Shvets Kirill <kirill.shvets@intel.com>
This commit is contained in:
parent
9b267a435e
commit
9a0399e898
@ -470,7 +470,9 @@ void GBTree::PredictBatch(DMatrix* p_fmat,
|
|||||||
uint32_t tree_begin, tree_end;
|
uint32_t tree_begin, tree_end;
|
||||||
std::tie(tree_begin, tree_end) =
|
std::tie(tree_begin, tree_end) =
|
||||||
detail::LayerToTree(model_, tparam_, layer_begin, layer_end);
|
detail::LayerToTree(model_, tparam_, layer_begin, layer_end);
|
||||||
predictor->PredictBatch(p_fmat, out_preds, model_, tree_begin, tree_end);
|
if (tree_end > tree_begin) {
|
||||||
|
predictor->PredictBatch(p_fmat, out_preds, model_, tree_begin, tree_end);
|
||||||
|
}
|
||||||
if (reset) {
|
if (reset) {
|
||||||
out_preds->version = 0;
|
out_preds->version = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user