在Python中尝试将XGBoost与gpu一起使用时,出现错误“Check failed:gpu\U predictor\”

2024-09-27 04:21:15 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在Python中使用XGBoost来获取错误

    xgboost.core.XGBoostError: [09:26:06] c:\users\administrator\workspace\xgboost-win64_release_1.0.0\src\gbm\gbtree.h:308: Check failed: gpu_predictor_: 

我正在使用SKL学习和构建模型,就像

    model = XGBRegressor(learning_rate = 0.02,
                 n_estimators = 1000,
                    max_depth = 12,
                    tree_method='gpu_hist',
                    objective = 'reg:logistic',
                    nthread = -1,
                    silent = False)

它与“hist”一起作为cpu上的树_方法工作


Tags: coresrcreleasegpu错误usersworkspacehist
1条回答
网友
1楼 · 发布于 2024-09-27 04:21:15

可能您的GPU不支持CUDA,根据XG Boost website的要求:

The GPU algorithms in XGBoost require a graphics card with compute capability 3.5 or higher, with CUDA toolkits 10.0 or later

至少,这是我的问题。如果要检查它,可以使用this list

遗憾的是,我找不到解决这个问题的方法

相关问题 更多 >

    热门问题