python报错ImportError: [joblib] Attempting to do parallel computing without protecting
来源:互联网 发布:柳海龙 知乎 编辑:程序博客网 时间:2024/05/17 04:30
错误:
ImportError: [joblib] Attempting to do parallel computing without protecting your import on a system that does not support forking. To use parallel-computing in a script, you must protect your main loop using “if name == ‘main‘”. Please see the joblib documentation on Parallel for more information
解决方案:
from sklearn.grid_search import GridSearchCVif __name__=='__main__'://加入此行代码即可 Cs=np.logspace(-6,-1,10) clf=GridSearchCV(estimator=svc,param_grid=dict(C=Cs),n_jobs=-1) clf.fit(X_digits[:1000],Y_digits[:1000]) print (clf.best_score_) print (clf.best_estimator_.C) print (clf.score(X_digits[1000:],Y_digits[1000:]))
0 0
- python报错ImportError: [joblib] Attempting to do parallel computing without protecting
- python:并行化网格搜索中ImportError: [joblib] Attempting to do parallel computing without protecting...
- python并行计算 [joblib] Attempting to do parallel computing without protecting。。。
- python进行KMeans聚类算法raise ImportError('[joblib] Attempting to do parallel computing ' ImportError: [jo
- Introduction to Parallel Computing
- python平行(3):【parallel python】与【sklearn joblib的parallel和delayed】性能对比
- 并行计算概述 (Introduction to Parallel Computing)
- Introduction to Parallel Computing 阅读笔记
- 【Tensorflow】报错:FailedPreconditionError: Attempting to use uninitialized value keep_prob_7
- perl 报错 Can't do inplace edit without backup
- Python: joblib.Parallel method in a class 'TypeError : can't pickle instancementhod objects'
- Altera笔记:Introduction to Parallel Computing with OpenCL
- opencv报错,ImportError: numpy.core.multiarray failed to import
- Collision Detection - Parallel Computing
- Parallel Computing with MATLAB
- Matlab parallel Computing
- [c++]parallel computing
- [Vertica报错]Spread error; can't determine which DBs are running; attempting to continue... '
- Github提交代码方法
- JavaScript实现9*9乘法表+隔行换色
- 在子父类中,成员的特点体现
- 常用函数
- don't run elasticsearch as root
- python报错ImportError: [joblib] Attempting to do parallel computing without protecting
- ElasticSearch前言
- 人脸识别数据库
- Spring4的知识应用总结(五)——AOP
- php搭建mvc框架五(模型类)
- 怎样写 OpenStack Neutron 的 Extension 和plugin
- Webcollector + Spring + MVC 搭建应用初探(一)
- ios开发 自定义带弧度的UITabBar,保留系统原有push和pop过渡效果
- PAT (Basic Level) Practise (中文)--1001