簡體   English   中英

Cuda 10.1。 cuDNN 7.6.6 是否與 tensorflow 1.14 兼容?

[英]Cuda 10.1. cuDNN 7.6.6 are compatible with tensorflow 1.14?

我正在嘗試在 nvidia cuda 10.1 上使用 tensorflow 1.14 中的 keras 訓練我的第一個 NN,但我收到以下錯誤:

tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found.
  (0) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
         [[{{node conv2d/Conv2D}}]]
  (1) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
         [[{{node conv2d/Conv2D}}]]
         [[metrics/acc/Identity/_113]

I have seen that for keras 2 there are some workaround removing the limit of the memory growth for the gpu, is there something similar for tensorflow 1.14?

如果不行,不改cuda安裝怎么解決?

您可以降級 tensorflow:

pip install --upgrade tensorflowgpu==1.8.0

或者:

pip install tf-gpu=1.15.0 and keras=2.24

config = tf.compat.v1.ConfigProto()
config.gpu_options.allow_growth = True
session = tf.compat.v1.InteractiveSession(config=config)

或者您可以使用此代碼進行初始化:

import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
    try:
        for gpu in gpus:
            tf.config.experimental.set_memory_growth(gpu, True)

    except RuntimeError as e:
        print(e)

他們一起工作:

例如。 Cuda 10.0 + CuDNN 7.6.3 + / TensorFlow 1.13/1.14 / TensorFlow 2.0。

例如2 Cuda 9 + CuDNN 7.0.5 + TensorFlow 1.10 作品

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM