当前位置:网站首页>Various errors encountered by tensorflow
Various errors encountered by tensorflow
2022-06-26 09:51:00 【A cloud in the sky】
Catalog
ImportError: cannot import name 'set_random_seed' from 'tensorflow'
module ‘tensorflow’ has no attribute ‘ConfigProto’/'Session’
`set_session` is not available when using TensorFlow 2.0
OP_REQUIRES failed at save_restore_v2_ops.cc:109 : Not found: Failed to create a NewWriteableFile:
Version of the problem
Many errors are reported because of version problems ,TensorFlow Version of 、CUDA The version of . For example, the following example :
ImportError: Could not find 'cudart64_100.dll'
Need to download the corresponding CUDA edition .
Or go online to download cudart64_100.dll, copy to
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\10.1\Development\bin Under the table of contents
ImportError: cannot import name 'set_random_seed' from 'tensorflow'
TensorFlow-GPU2.0 Encountered this problem in
2.0 New writing in :
import tensorflow
tensorflow.random.set_seed(x)
module ‘tensorflow’ has no attribute ‘ConfigProto’/'Session’
tensorflow2.0 The version is updated with the previous version , So change the above code to the following :
# original edition config = tf.ConfigProto(allow_soft_placement=True)
config = tf.compat.v1.ConfigProto(allow_soft_placement=True)
# original edition sess = tf.Session(config=config)
sess =tf.compat.v1.Session(config=config) # Be careful , Here for tensorflow2.0 edition , With the first 1.0 There is a gap .
`set_session` is not available when using TensorFlow 2.0
If you encounter an error like this , Will
keras.backend.tensorflow_backend.set_session(tf.compat.v1.Session(config=config))
Change it to
tf.compat.v1.keras.backend.set_session(tf.compat.v1.Session(config=config))
OP_REQUIRES failed at save_restore_v2_ops.cc:109 : Not found: Failed to create a NewWriteableFile:
The problem of path writing , Wrong writing
root_path = "../results/"
Write it correctly
root_path = "..\\results\\"
边栏推荐
- Common SQL add / delete / modify query statements
- 自动化测试——pytest框架介绍及示例
- Redis notes (14) - persistence and data recovery (data persistence RDB and AOF, data recovery, mixed persistence)
- 2021 national vocational college skills competition (secondary vocational group) network security competition questions (1) detailed analysis tutorial
- Leetcode connected to rainwater series 42 (one dimension) 407 (2D)
- 使用递归或while循环获取父/子层级结构的名称
- Click the mask layer to close the pop-up window
- 十万行事务锁,开了眼界了。
- Redis notes (15) - Pipeline (the client packages and sends batch commands to save network overhead)
- A concise tutorial for getting started with go generics
猜你喜欢
深度学习(初识tensorflow2.版本)之三好学生成绩问题(1)
Explained: A Style-Based Generator Architecture for GANs (StyleGAN)
install opencv-contrib-dev to use aruco code
Single sign on logic
What you need to know to test -- URL, weak network, interface, automation
Creation and use of XSync synchronization script (taking debian10 cluster as an example)
2021-11-29 轨迹规划五次多项式
Redis novice introduction
软件测试---如何选择合适的正交表
logback
随机推荐
Go learning notes (83) - code specification and common development skills
The first problem troubleshooting process of re disk
2021年全国职业院校技能大赛(中职组)网络安全竞赛试题(2)详解
Notes on sports planning on November 22, 2021
Halcon photometric stereoscopic
How about the security of flush stock trading software? How to open an account in flush
c语言语法基础之——指针( 多维数组、函数、总结 ) 学习
thinkphp6.0的第三方扩展包,支持上传阿里云,七牛云
自动化测试——关于unitest与pytest初始化共存问题
Detailed explanation of the network security competition questions (2) of the 2021 national vocational college skills competition (secondary vocational group)
libgstreamer-1.0. so. 0: cannot open shared object file: No such file or directory
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. npm ER
online trajectory generation
install opencv-contrib-dev to use aruco code
SQL 函数
Daily-used English phrases
Comparison of similar PMS in QPM
Click the mask layer to close the pop-up window
深度学习(初识tensorflow2.版本)之三好学生成绩问题(1)
Leetcode basic calculator 224 227. follow up 394