当前位置:网站首页>[error] error loading H5 weight attributeerror: 'STR' object has no attribute 'decode‘
[error] error loading H5 weight attributeerror: 'STR' object has no attribute 'decode‘
2022-07-08 01:52:00 【there2belief】
problem
tensorflow stay python3.7 Environment loading python3.6 Environmental h5 Error in weight
AttributeError: 'str' object has no attribute 'decode'
Solutions
According to the question , intend , Property error :“str” Object has no properties “decode”
Most of the problems on the Internet are python3 and 2 The difference between
for example :python3.5 and Python2.7 The difference in socket return value decoding
python stay bytes and str Two types of conversion , The required functions are encode(),decode()
The author appeared in python3.7 And python3.6
resolvent
T1、 Directly remove
Directly remove decode('utf8')tips:str adopt encode() Methods can be encoded as specified bytes. In turn, , When the byte stream is read from the network or disk , So the data you read is bytes. To put bytes Turn into str, It needs to be used. decode() Method . conversely , Then use encode() The method can !
T2、 Suggestions highly praised by many netizens
pip install 'h5py<3.0.0' -i https://pypi.tuna.tsinghua.edu.cn/simple
————————————————
Thanks to:https://blog.csdn.net/qq_41185868/article/details/82079079
边栏推荐
- nmap工具介紹及常用命令
- Voice of users | understanding of gbase 8A database learning
- Usage of xcolor color in latex
- 日志特征选择汇总(基于天池比赛)
- C语言-Cmake-CMakeLists.txt教程
- Voice of users | winter goes and spring comes, waiting for flowers to bloom -- on gbase 8A learning comprehension
- 用户之声 | 冬去春来,静待花开 ——浅谈GBase 8a学习感悟
- 【错误】加载h5权重出错AttributeError: ‘str‘ object has no attribute ‘decode‘
- Is NPDP recognized in China? Look at it and you'll see!
- cv2-drawline
猜你喜欢
神经网络与深度学习-5- 感知机-PyTorch
Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
C language - modularization -clion (static library, dynamic library) use
COMSOL - Construction of micro resistance beam model - final temperature distribution and deformation - establishment of geometric model
QT -- package the program -- don't install qt- you can run it directly
保姆级教程:Azkaban执行jar包(带测试样例及结果)
Remote Sensing投稿經驗分享
COMSOL----微阻梁模型的搭建---最终的温度分布和变形情况----几何模型的建立
Working principle of stm32gpio port
From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
随机推荐
Urban land use distribution data / urban functional zoning distribution data / urban POI points of interest / vegetation type distribution
NPDP在国内有认可度吗?看一看就明白了!
Get familiar with XML parsing quickly
Sword finger offer II 041 Average value of sliding window
Euler Lagrange equation
Remote sensing contribution experience sharing
About snake equation (3)
The body has a mysterious margin of 8px
Kafka connect synchronizes Kafka data to MySQL
神经网络与深度学习-5- 感知机-PyTorch
Working principle of stm32gpio port
How to make the conductive slip ring signal better
PHP to get information such as audio duration
C语言-Cmake-CMakeLists.txt教程
Qml 字体使用pixelSize来自适应界面
Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
How mysql/mariadb generates core files
项目经理有必要考NPDP吗?我告诉你答案
Introduction to grpc for cloud native application development
GBASE观察 | 数据泄露频发 信息系统安全应如何守护