scikit将学习利用GPU吗?

2024-04-28 03:35:35 发布

您现在位置:Python中文网/ 问答频道 /正文

阅读tensroflow中scikit learn的实现:http://learningtensorflow.com/lesson6/和scikit learn:http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html我正在努力决定使用哪个实现。

scikit learn作为tensorflow docker容器的一部分安装,因此可以使用任一实现。

使用scikit学习的原因:

scikit-learn contains less boiler plate than the tensorflow implementation.

使用tensorflow的原因:

If running on Nvidia GPU the algorithm wilk be run against in parallel , I'm not sure if scikit-learn will utilise all available GPU's ?

正在读取https://www.quora.com/What-are-the-main-differences-between-TensorFlow-and-SciKit-Learn

TensorFlow is more low-level; basically, the Lego bricks that help you to implement machine learning algorithms whereas scikit-learn offers you off-the-shelf algorithms, e.g., algorithms for classification such as SVMs, Random Forests, Logistic Regression, and many, many more. TensorFlow really shines if you want to implement deep learning algorithms, since it allows you to take advantage of GPUs for more efficient training.

这句话再次证实了我的断言“scikit-learn包含的锅炉板比tensorflow实现更少”,但也表明scikit-learn不会使用所有可用的GPU?


Tags: andthetocomyouhttpifgpu
2条回答

Tensorflow只有在针对Cuda和CuDNN构建时才使用GPU。默认情况下,两者都不会使用GPU,特别是如果GPU在Docker中运行,除非使用nvidia-docker和能够执行此操作的映像。

Scikit-learn不打算用作深度学习框架,而且它似乎不支持GPU计算。

Why is there no support for deep or reinforcement learning / Will there be support for deep or reinforcement learning in scikit-learn?

Deep learning and reinforcement learning both require a rich vocabulary to define an architecture, with deep learning additionally requiring GPUs for efficient computing. However, neither of these fit within the design constraints of scikit-learn; as a result, deep learning and reinforcement learning are currently out of scope for what scikit-learn seeks to achieve.

http://scikit-learn.org/stable/faq.html#why-is-there-no-support-for-deep-or-reinforcement-learning-will-there-be-support-for-deep-or-reinforcement-learning-in-scikit-learn中提取

Will you add GPU support in scikit-learn?

No, or at least not in the near future. The main reason is that GPU support will introduce many software dependencies and introduce platform specific issues. scikit-learn is designed to be easy to install on a wide variety of platforms. Outside of neural networks, GPUs don’t play a large role in machine learning today, and much larger gains in speed can often be achieved by a careful choice of algorithms.

http://scikit-learn.org/stable/faq.html#will-you-add-gpu-support中提取

完全没有

看看常见问题解答“你会添加GPU支持吗?”由scikit learnhere提供。他们已经清楚地解释了原因。

相关问题 更多 >