【发布时间】:2020-06-19 21:02:03
【问题描述】:
我知道这在任何意义上都不是机器学习的推荐设置,但我想使用我所拥有的。
不是专家,有人告诉我 tf-gpu 应该适用于 cuda 支持的任何设备。
当我跑步时:
from numba import cuda
cuda.detect()
我明白了:
Found 1 CUDA devices
id 0 b'GeForce MX130' [SUPPORTED]
compute capability: 5.0
pci device id: 0
pci bus id: 1
Summary:
1/1 devices are supported
我可以让 GPU 处理一些基本的“矢量化”任务。
另外,正在运行:
import tensorflow as tf
tf.test.is_built_with_cuda()
将返回 True
但是,正在运行
tf.config.experimental.list_physical_devices('gpu')
将返回一个空列表。
跑步:
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))
将返回:
Num GPUs Available: 0
跑步:
strategy = tf.distribute.MirroredStrategy()
print("Number of devices: {}".format(strategy.num_replicas_in_sync))
将返回:
WARNING:tensorflow:There are non-GPU devices in `tf.distribute.Strategy`, not using nccl allreduce.
INFO:tensorflow:Using MirroredStrategy with devices ('/job:localhost/replica:0/task:0/device:CPU:0',)
Number of devices: 1
我已经用非 GPU 版本的 tensorflow 训练了一些基本模型,但我不知道如何处理 tf-gpu。根据任务管理器的说法,我能够用 CuDNNLSTM 层拟合模型,但脚本没有使用 GPU。
我将不胜感激任何关于如何让它使用我的“gpu”的建议或确认它是不可能的。谢谢!
已编辑:
我卸载了 keras 和两个 tensorflow 版本,只安装了 tensorflow-gpu。没有任何改变。
【问题讨论】:
-
你能在 Tensorflow 上使用 NVIDIA GeForce MX130 吗?我有相同的运行 Windows 10。
标签: python tensorflow jupyter-notebook gpu