最近,我尝试在 Github 上重复深度学习实验。然而,每次运行该实验时,我都会收到以下错误信息。
2018-08-27 09:32:16.827025: E T:\src\github\tensorflow\tensorflow\stream_executor\cuda\cuda_dnn.cc:332] could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
在这种情况下,我将Tensorflow中的会话设置如下。
sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True, log_device_placement=False))
如果我尝试按照以下方式限制GPU内存,我发现我没有足够的内存来运行我的模型。
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
我的GPU信息如下。我不确定问题出在哪里,我遇到过几次这样的问题。感谢您的贡献!
2018-08-27 09:31:45.966248: IT:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2018-08-27 09:31:46.199314: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1392] Found device 0 with properties:
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.683
pciBusID: 0000:01:00.0
totalMemory: 11.00GiB freeMemory: 9.09GiB