簡體   English   中英

python中XGBoost如何選擇GPU設備

[英]How to choose GPU device for XGBoost in python

我在 Python 的共享服務器 linux 上運行 XGBoost(eXtreme Gradient Boosting),該服務器配備了多個 GPU。 當我在 GPU 上運行 XGBoost 時,XGBoost 會自動選擇 GPU 設備 0。有人知道我如何使 XGBoost 成為 select 另一個 GPU 嗎? (gpu0 通常太忙了)

查看源代碼,原來可以通過將 gpu 設備號分配給gpu_id來在 class 的構造函數中選擇它。 例如,

xgb.XGBClassifier(tree_method='gpu_hist',predictor='gpu_predictor',gpu_id=1)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM