我使用的是h2o4gpu,我设置的参数是
h2o4gpu.solvers.xgboost.RandomForestClassifier model.
XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,
colsample_bytree=1.0, gamma=0, learning_rate=0.1, max_delta_step=0,
max_depth=8, min_child_weight=1, missing=nan, n_estimators=100,
n_gpus=1, n_jobs=-1, nthread=None, num_parallel_tree=1, num_round=1,
objective='binary:logistic', predictor='gpu_predictor',
random_state=123, reg_alpha=0, reg_lambda=1, scale_pos_weight=1,
seed=None, silent=False, subsample=1.0, tree_method='gpu_hist')当我训练这个模型,然后进行预测时,一切都在GPU上运行得很好。
然而,当我将我的模型保存在pickle中,然后加载回另一个笔记本,然后在它上通过predict_proba运行预测时,所有的东西都在CPU上运行。
为什么我的预测不能在GPU上运行?
发布于 2018-06-13 05:04:30
预测是在CPU上运行的,所以你不需要GPU来实际使用模型。
https://stackoverflow.com/questions/50810039
复制相似问题