当前位置:网站首页>[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
边栏推荐
- C language - modularization -clion (static library, dynamic library) use
- Version 2.0 of tapdata, the open source live data platform, has been released
- Chapter 7 behavior level modeling
- Gbase observation | how to protect the security of information system with frequent data leakage
- 液压旋转接头的使用事项
- Nacos microservice gateway component +swagger2 interface generation
- 由排行榜实时更新想到的数状数值
- Android 创建的sqlite3数据存放位置
- 跨模态语义关联对齐检索-图像文本匹配(Image-Text Matching)
- Remote Sensing投稿經驗分享
猜你喜欢

Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布

Remote Sensing投稿经验分享

C language - modularization -clion (static library, dynamic library) use

Voice of users | understanding of gbase 8A database learning

Introduction to grpc for cloud native application development

2022国内十大工业级三维视觉引导企业一览

C语言-Cmake-CMakeLists.txt教程

生态 | 湖仓一体的优选:GBase 8a MPP + XEOS

不算不知道,花呗分期的真实利率居然这么高
![[target tracking] |dimp: learning discriminative model prediction for tracking](/img/72/d151fe0eb0a92e8c6931e6c50dad0f.png)
[target tracking] |dimp: learning discriminative model prediction for tracking
随机推荐
Application of slip ring in direct drive motor rotor
Anaconda3 tutorial on installing and adding Tsinghua image files
How to make the conductive slip ring signal better
The numerical value of the number of figures thought of by the real-time update of the ranking list
从cmath文件看名字是怎样被添加到命名空间std中的
图解网络:揭开TCP四次挥手背后的原理,结合男女朋友分手的例子,通俗易懂
WPF 自定义 写实风 雷达图控件
[target tracking] |atom
项目经理有必要考NPDP吗?我告诉你答案
Version 2.0 of tapdata, the open source live data platform, has been released
The usage of rand function in MATLAB
MySQL数据库(2)
Qml 字体使用pixelSize来自适应界面
腾讯游戏客户端开发面试 (Unity + Cocos) 双重轰炸 社招6轮面试
COMSOL - Construction of micro resistance beam model - final temperature distribution and deformation - establishment of geometric model
Working principle of stm32gpio port
Usage of xcolor color in latex
MySQL查询为什么没走索引?这篇文章带你全面解析
ANSI / NEMA- MW- 1000-2020 磁铁线标准。. 最新原版
nacos-微服务网关Gateway组件 +Swagger2接口生成