tensorflow2.2版本中Session模块问题

记录一下

>>> import tensorflow as tf
2021-02-07 10:35:01.838577: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
>>> tf.compat.v1.disable_eager_execution()
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.compat.v1.Session()
2021-02-07 10:35:42.554987: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2021-02-07 10:35:42.583377: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: Quadro P600 computeCapability: 6.1
coreClock: 1.5565GHz coreCount: 3 deviceMemorySize: 2.00GiB deviceMemoryBandwidth: 59.75GiB/s
2021-02-07 10:35:42.589929: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2021-02-07 10:35:42.599576: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
2021-02-07 10:35:42.610187: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll
2021-02-07 10:35:42.616895: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll
2021-02-07 10:35:42.629030: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll
2021-02-07 10:35:42.637385: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll
2021-02-07 10:35:42.644743: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found
2021-02-07 10:35:42.648898: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1598] 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...
2021-02-07 10:35:42.657045: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2021-02-07 10:35:42.667474: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x151575c7e40 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-02-07 10:35:42.671462: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2021-02-07 10:35:42.675313: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-02-07 10:35:42.677823: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]
>>> print(sess.run(hello))
b'Hello, TensorFlow!'

参考:tensorflow2.0版本中Session模块

你可能感兴趣的:(报错汇总,tensorflow)