问题1:Could not load dynamic library cudart64_101.dll
解决方法:https://www.dll-files.com/download/1d7955354884a9058e89bb8ea34415c9/cudart64_101.dll.html?c=VElyVUtzT2Q0R2xhc2JNK1ZUa0Jvdz09
问题2:tensorflow-gpu版本使用时报错,各种dll文件找不到
2020-06-15 20:30:54.310396: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cublas64_10.dll’; dlerror: cublas64_10.dll not found
2020-06-15 20:30:54.311457: W
tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not
load dynamic library ‘cufft64_10.dll’; dlerror: cufft64_10.dll not found
2020-06-15 20:30:54.312777: W
tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not
load dynamic library ‘curand64_10.dll’; dlerror: curand64_10.dll not
found
2020-06-15 20:30:54.314450: W
tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not
load dynamic library ‘cusolver64_10.dll’; dlerror: cusolver64_10.dll not
found
2020-06-15 20:30:54.315749: W
tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not
load dynamic library ‘cusparse64_10.dll’; dlerror: cusparse64_10.dll not
found
2020-06-15 20:30:54.316863: W
tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not
load dynamic library ‘cudnn64_7.dll’; dlerror: cudnn64_7.dll not found
2020-06-15 20:30:54.317064: W
tensorflow/core/common_runtime/gpu/gpu_device.cc:1592] Cannot dlopen
some GPU libraries. Please make sure the missing libraries mentioned
above are installed properly if you would like to use GPU. Follow the
guide at https://www.tensorflow.org/install/gpu for how to download and
setup the required libraries for your platform.
Skipping registering GPU devices…
解决方法:https://www.pianshen.com/article/37081444749/
问题3:RuntimeError: The Session graph is empty. Add operations to the graph before calling run().
解决方法:tf.compat.v1.disable_eager_execution()
无法执行sess.run()的原因是tensorflow版本不同导致的,tensorflow版本2.0无法兼容版本1.0.
import tensorflow as tf print(tf.__version__) tf.compat.v1.disable_eager_execution() # 保证sess.run()能够正常运行 hello = tf.constant(‘hello tensorflow!‘) sess = tf.compat.v1.Session() # 版本2.0的函数 print(sess.run(hello))
Pycharm+Tensorflow安装和使用出现的问题集合
原文:https://www.cnblogs.com/xieyi-1994/p/13956041.html