东方耀AI技术分享

标题: 报错:PicklingError: Could not pickle the task to send it to the workers. [打印本页]

作者: 东方耀    时间: 2019-10-30 17:55
标题: 报错:PicklingError: Could not pickle the task to send it to the workers.
# 报错:PicklingError: Could not pickle the task to send it to the workers.

原因:无法并行化  之前设置n_jobs=-1 使用所有的线程


设置n_jobs=1 即可



在有些特殊情况下 需要这样:比如是
keras的模型被scikit-learn包装之后 用RandomizedSearchCV, GridSearchCV 进行超参数搜索时遇到的

神经网络的超参数搜索:借用scikit-learn成熟的封装!









欢迎光临 东方耀AI技术分享 (http://www.ai111.vip/) Powered by Discuz! X3.4