我和conda env keras一起用jupyter笔记本跑。首先只安装CPU,然后安装GPU。只尝试用GPU TF制作另一个env,但仍然是相同的错误。有人能给我指路吗?编辑:操作是标准的,安装了CUDA 9.0,并在C:\Program \NVIDIA计算工具包\CUDA\v9.0\bin插入了文件cudnn64_7.dll。
import tensorflow as tf
hello = tf.constant('Hello')
sess = tf.Session()
print(sess.run(hello))
2018-02-15 10:52:30.240960: I C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructi
ons that this TensorFlow binary was not compiled to use: AVX AVX2
2018-02-15 10:52:30.410969: I C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\core\common_runtime\gpu\gpu_device.cc:1105] Found device 0 with pro
perties:
name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.392
pciBusID: 0000:01:00.0
totalMemory: 4.00GiB freeMemory: 3.86GiB
2018-02-15 10:52:30.410969: I C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\core\common_runtime\gpu\gpu_device.cc:1195] Creating TensorFlow dev
ice (/device:GPU:0) -> (device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:0
1:00.0, compute capability: 6.1)
2018-02-15 10:52:32.394083: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\stream_executor\cuda\cuda_driver.cc:936] failed to allocate 3.53G (
3790774272 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-02-15 10:52:32.482088: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\stream_executor\cuda\cuda_driver.cc:936] failed to allocate 3.18G (
3411696640 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-02-15 10:52:32.527090: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\stream_executor\cuda\cuda_driver.cc:936] failed to allocate 2.86G (
3070526976 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-02-15 10:52:32.551092: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\stream_executor\cuda\cuda_driver.cc:936] failed to allocate 2.57G (
2763474176 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-02-15 10:52:32.574093: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\stream_executor\cuda\cuda_driver.cc:936] failed to allocate 2.32G (
2487126784 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-02-15 10:52:32.595094: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\stream_executor\cuda\cuda_driver.cc:936] failed to allocate 2.08G (
2238414080 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-02-15 10:52:32.613095: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\stream_executor\cuda\cuda_driver.cc:936] failed to allocate 1.88G (
2014572800 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-02-15 10:52:32.629096: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\stream_executor\cuda\cuda_driver.cc:936] failed to allocate 1.69G (
1813115648 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-02-15 10:52:32.645097: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\stream_executor\cuda\cuda_driver.cc:936] failed to allocate 1.52G (
1631804160 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-02-15 10:52:32.658098: E C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\stream_executor\cuda\cuda_driver.cc:936] failed to allocate 1.37G (
1468623872 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-02-15 10:52:43.783734: I C:\tf_jenkins\workspace\rel-win\M\windows-gpu\PY\3
6\tensorflow\core\common_runtime\gpu\gpu_device.cc:1195] Creating TensorFlow dev
ice (/device:GPU:0) -> (device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:0
1:00.0, compute capability: 6.1)发布于 2018-02-19 06:17:20
这个问题是在官方网站的安装说明中输入错误的。在GitHub写的是CuDNN 7。
发布于 2018-02-15 12:34:33
您需要CuDNN V6.0,您可以检查需求windows
检查“使用GPU支持运行TensorFlow的需求”
https://stackoverflow.com/questions/48804548
复制相似问题