scikit-learn将利用GPU吗? [英] Will scikit-learn utilize GPU?

查看:1042
本文介绍了scikit-learn将利用GPU吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Reading implementation of scikit-learn in tensroflow : http://learningtensorflow.com/lesson6/ and scikit-learn : http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html I'm struggling to decide which implementation to use.

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

scikit-learn is installed as part of the tensorflow docker container so can use either implementation.

使用scikit-learn的原因:

Reason to use scikit-learn :

scikit-learn所包含的样板少于tensorflow 实施.

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

使用张量流的原因:

如果在Nvidia GPU上运行,则算法将并行运行 ,我不确定scikit-learn是否会利用所有可用的GPU?

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/TensorFlow和SciKit学习之间的主要区别是什么

TensorFlow更底层;基本上,乐高积木可以帮助 您实现机器学习算法,而scikit-learn 为您提供现成的算法,例如用于 分类,例如SVM,随机森林,逻辑回归和 很多很多如果您想实施TensorFlow真的很成功 深度学习算法,因为它可以让您充分利用 使用GPU进行更有效的培训.

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所包含的样板少于张量流实现",但同时也暗示scikit-learn不会利用所有可用的GPU?

This statement re-enforces my assertion that "scikit-learn contains less boiler plate than the tensorflow implementation" but also suggests scikit-learn will not utilise all available GPU's ?

推荐答案

如果Tensorflow是针对Cuda和CuDNN构建的,则仅使用GPU.默认情况下,两者都不会使用GPU,尤其是如果它在Docker内部运行时,除非您使用 nvidia-docker 和能够执行此操作的图像.

Tensorflow only uses GPU if it is built against Cuda and CuDNN. By default none of both are going to use GPU, especially if it is running inside Docker, unless you use nvidia-docker and an image capable of doing it.

Scikit-learn不能用作深度学习框架,它似乎不支持GPU计算.

Scikit-learn is not intended to be used as a deep-learning framework, and seems that it doesn't support GPU computations.

为什么在scikit-learn中不支持深度学习或强化学习?

深度学习和强化学习都需要丰富的知识 定义架构的词汇表,另外还需进行深度学习 需要GPU进行高效计算.但是,这些都不适合 在scikit-learn的设计约束范围内;结果,深 学习和强化学习目前不在以下范围内 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.

摘录自

您是否会在scikit-learn中添加GPU支持?

否,或者至少在不久的将来不会.主要原因是GPU 支持将引入许多软件依赖关系并引入 平台特定的问题. scikit-learn易于设计 安装在各种平台上.在神经网络之外, 在当今的机器学习中,GPU扮演的角色不大,而且在很大程度上 谨慎选择以下方法,通常可以实现更大的速度提升 算法.

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

这篇关于scikit-learn将利用GPU吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆