加载模型权重后的 CuDNN 库兼容性错误 [英] CuDNN library compatibility error after loading model weights

查看:30
本文介绍了加载模型权重后的 CuDNN 库兼容性错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试加载 NSynth 权重,我正在使用 tf 版本 1.7.0

I am trying to load NSynth weights and I am using tf version 1.7.0

from magenta.models.nsynth import utils
from magenta.models.nsynth.wavenet import fastgen

def wavenet_encode(file_path):

 # Load the model weights.
 checkpoint_path = './wavenet-ckpt/model.ckpt-200000'

 # Load and downsample the audio.
 neural_sample_rate = 16000
 audio = utils.load_audio(file_path, 
                          sample_length=400000, 
                          sr=neural_sample_rate)

 encoding = fastgen.encode(audio, checkpoint_path, len(audio))

 # Reshape to a single sound.
 return encoding.reshape((-1, 16))

# An array of n * 16 frames. 
wavenet_z_data = wavenet_encode(file_path)

我收到以下错误:

tensorflow/stream_executor/cuda/cuda_dnn.cc:396] 加载的运行时 CuDNN库:7103(兼容版本 7100)但已编译源代码与 7005(兼容版本 7000).如果使用二进制安装,升级您的 CuDNN 库以匹配.如果从源代码构建,则使确保在运行时加载的库匹配兼容版本编译配置时指定.

tensorflow/stream_executor/cuda/cuda_dnn.cc:396] Loaded runtime CuDNN library: 7103 (compatibility version 7100) but source was compiled with 7005 (compatibility version 7000). If using a binary install, upgrade your CuDNN library to match. If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.

我应该怎么做,我应该安装哪个版本的 tf,以及我需要哪个 CUDA 版本?

What should I do and, which version of tf should I install, and exactly which CUDA version do I need?

推荐答案

正如错误所说,您使用的 Tensorflow 版本是为 CuDNN 7.0.5 编译的,而您的系统已安装 CuDNN 7.1.3.

As the error says, the Tensorflow version you are using is compiled for CuDNN 7.0.5 while your system has CuDNN 7.1.3 installed.

正如错误所提示的,您可以解决这个问题:

As the error also suggests, you can solve this problem:

这篇关于加载模型权重后的 CuDNN 库兼容性错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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