当前位置:网站首页>[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
边栏推荐
- 碳刷滑环在发电机中的作用
- Application of slip ring in direct drive motor rotor
- 滑环在直驱电机转子的应用领域
- Nacos microservice gateway component +swagger2 interface generation
- MySQL数据库(2)
- metasploit
- Why did MySQL query not go to the index? This article will give you a comprehensive analysis
- SQLite3 data storage location created by Android
- 如何制作企业招聘二维码?
- Codeforces Round #649 (Div. 2)——A. XXXXX
猜你喜欢
滑环在直驱电机转子的应用领域
Qt - - Packaging Programs - - Don't install Qt - can run directly
Capability contribution three solutions of gbase were selected into the "financial information innovation ecological laboratory - financial information innovation solutions (the first batch)"
滑环使用如何固定
nmap工具介绍及常用命令
Remote sensing contribution experience sharing
【目标跟踪】|atom
C language - modularization -clion (static library, dynamic library) use
ClickHouse原理解析与应用实践》读书笔记(8)
Application of slip ring in direct drive motor rotor
随机推荐
From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
进程和线程的退出
How to realize batch control? MES system gives you the answer
adb工具介绍
Why did MySQL query not go to the index? This article will give you a comprehensive analysis
ArrayList源码深度剖析,从最基本的扩容原理,到魔幻的迭代器和fast-fail机制,你想要的这都有!!!
Urban land use distribution data / urban functional zoning distribution data / urban POI points of interest / vegetation type distribution
Matlab method is good~
生态 | 湖仓一体的优选:GBase 8a MPP + XEOS
NPDP在国内有认可度吗?看一看就明白了!
微软 AD 超基础入门
C语言-模块化-Clion(静态库,动态库)使用
[SolidWorks] modify the drawing format
Codeforces Round #633 (Div. 2) B. Sorted Adjacent Differences
powerbuilder 中使用线程的方法
什么样的MES系统才是好系统
Redisson分布式锁解锁异常
Coordinate conversion of one-dimensional array and two-dimensional matrix (storage of matrix)
About snake equation (3)
PHP to get information such as audio duration