当前位置:网站首页>[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
边栏推荐
- Codeforces Round #649 (Div. 2)——A. XXXXX
- 从Starfish OS持续对SFO的通缩消耗,长远看SFO的价值
- regular expression
- Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
- Codeforces Round #633 (Div. 2) B. Sorted Adjacent Differences
- Graphic network: uncover the principle behind TCP's four waves, combined with the example of boyfriend and girlfriend breaking up, which is easy to understand
- adb工具介绍
- 生态 | 湖仓一体的优选:GBase 8a MPP + XEOS
- MySQL数据库(2)
- 【目标跟踪】|DiMP: Learning Discriminative Model Prediction for Tracking
猜你喜欢

Android 创建的sqlite3数据存放位置

碳刷滑环在发电机中的作用

云原生应用开发之 gRPC 入门

Remote Sensing投稿经验分享

Remote sensing contribution experience sharing

不算不知道,花呗分期的真实利率居然这么高

Sword finger offer II 041 Average value of sliding window

ClickHouse原理解析与应用实践》读书笔记(8)

Optimization of ecological | Lake Warehouse Integration: gbase 8A MPP + xeos

QT--创建QT程序
随机推荐
Kafka connect synchronizes Kafka data to MySQL
Is it necessary for project managers to take NPDP? I'll tell you the answer
项目经理有必要考NPDP吗?我告诉你答案
Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
Codeforces Round #649 (Div. 2)——A. XXXXX
Remote sensing contribution experience sharing
Version 2.0 of tapdata, the open source live data platform, has been released
How to make the conductive slip ring signal better
跨模态语义关联对齐检索-图像文本匹配(Image-Text Matching)
QT build with built-in application framework -- Hello World -- use min GW 32bit
《ClickHouse原理解析与应用实践》读书笔记(7)
[SolidWorks] modify the drawing format
Urban land use distribution data / urban functional zoning distribution data / urban POI points of interest / vegetation type distribution
The numerical value of the number of figures thought of by the real-time update of the ranking list
什么样的MES系统才是好系统
第七章 行为级建模
Mat file usage
Anaconda3 tutorial on installing and adding Tsinghua image files
滑环使用如何固定
Gbase observation | how to protect the security of information system with frequent data leakage