xgboost交叉驗證以及n_jobs報錯


今天用xgboost跑了一下分類發生如下報錯:

A worker process managed by the executor was unexpectedly terminated.

This could be caused by a segmentation fault while calling the function or by an excessive memory usage causing the Operating System to kill the worker.

 

這是顯存不足造成的。

 

解決方案

制定富裕空間的顯卡

import os

os.environ["CUDA_VISIBLE_DEVICES"] = "0"

注意,用jupyter發生報錯時候可以嘗試本地腳本跑!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM