gpt4 book ai didi

python - scikit-learn 会使用 GPU 吗?

转载 作者:IT老高 更新时间:2023-10-28 22:02:50 30 4
gpt4 key购买 nike

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

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

使用 scikit-learn 的原因:

scikit-learn contains less boilerplate than the tensorflowimplementation.

使用 tensorflow 的原因:

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

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

TensorFlow is more low-level; basically, the Lego bricks that helpyou to implement machine learning algorithms whereas scikit-learnoffers you off-the-shelf algorithms, e.g., algorithms forclassification such as SVMs, Random Forests, Logistic Regression, andmany, many more. TensorFlow shines if you want to implementdeep learning algorithms, since it allows you to take advantage ofGPUs for more efficient training.

此声明再次强化了我的断言,即“scikit-learn 包含的样板文件比 tensorflow 实现少”,但也表明 scikit-learn 不会利用所有可用的 GPU?

最佳答案

Tensorflow 仅在基于 Cuda 和 CuDNN 构建时才使用 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 richvocabulary to define an architecture, with deep learning additionallyrequiring GPUs for efficient computing. However, neither of these fitwithin the design constraints of scikit-learn; as a result, deeplearning and reinforcement learning are currently out of scope forwhat 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 GPUsupport will introduce many software dependencies and introduceplatform specific issues. scikit-learn is designed to be easy toinstall on a wide variety of platforms. Outside of neural networks,GPUs don’t play a large role in machine learning today, and muchlarger gains in speed can often be achieved by a careful choice ofalgorithms.

摘自 http://scikit-learn.org/stable/faq.html#will-you-add-gpu-support

关于python - scikit-learn 会使用 GPU 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41567895/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com