当前位置: 首页 > news >正文

TensorFlow运行bug汇总

1、ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+

解决方案

pip install urllib3==1.26.15  -i https://pypi.tuna.tsinghua.edu.cn/simple
升级或者降级

(TF2.1) C:\Users\Administrator>pip install urllib3==1.26.15  -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting urllib3==1.26.15Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7b/f5/890a0baca17a61c1f92f72b81d3c31523c99bec609e60c292ea55b387ae8/urllib3-1.26.15-py2.py3-none-any.whl (140 kB)---------------------------------------- 140.9/140.9 kB 2.1 MB/s eta 0:00:00
Installing collected packages: urllib3Attempting uninstall: urllib3Found existing installation: urllib3 2.0.7Uninstalling urllib3-2.0.7:Successfully uninstalled urllib3-2.0.7
Successfully installed urllib3-1.26.15

2、If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.

升级或者降级

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn protobuf=3.20.1

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting protobuf==3.20.1Downloading https://pypi.tuna.tsinghua.edu.cn/packages/36/16/cfba8fcd817df923827233115df35dc048af12d0afa13df79b303865855a/protobuf-3.20.1-cp37-cp37m-win_amd64.whl (905 kB)---------------------------------------- 905.1/905.1 kB 3.2 MB/s eta 0:00:00
Installing collected packages: protobufAttempting uninstall: protobufFound existing installation: protobuf 4.24.4Uninstalling protobuf-4.24.4:Successfully uninstalled protobuf-4.24.4
Successfully installed protobuf-3.20.1

3、cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\XXX

pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple

改成

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn xxx

4、permission deny

权限错误:[errno 13]权限被拒绝

错误原因:

文件无法打开,可能产生的原因是文件找不到,或者被占用,或者无权限访问,或者打开的不是文件,而是一个目录

把打开的文件关闭。。。。

5、Cannot convert a symbolic Tensor (lstm/strided_slice:0) to a numpy array.

原因是 tensorflow 和 numpy 版本不兼容的问题

activate TF2.1
pip list
pip uninstall numpy
python -m pip install numpy==1.18.5

6、在加载训练之后的hdf5模型时,‘str’ object has no attribute ‘decode’

AttributeError: 'str' object has no attribute 'decode'

将h5py==2.10.0版本改为:

C:\Users\Administrator>python -m pip install h5py==2.10 -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting h5py==2.10Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a1/6b/7f62017e3f0b32438dd90bdc1ff0b7b1448b6cb04a1ed84f37b6de95cd7b/h5py-2.10.0-cp37-cp37m-win_amd64.whl (2.5 MB)---------------------------------------- 2.5/2.5 MB 6.1 MB/s eta 0:00:00
Requirement already satisfied: numpy>=1.7 in d:\programdata\anaconda3\envs\tf2.1\lib\site-packages (from h5py==2.10) (1.18.5)
Requirement already satisfied: six in d:\programdata\anaconda3\envs\tf2.1\lib\site-packages (from h5py==2.10) (1.16.0)
Installing collected packages: h5pyAttempting uninstall: h5pyFound existing installation: h5py 3.8.0Uninstalling h5py-3.8.0:Successfully uninstalled h5py-3.8.0
Successfully installed h5py-2.10.0

7、 

http://www.lryc.cn/news/347481.html

相关文章:

  • docker部署调度程序
  • websocket和http协议的区别
  • CSS之定位
  • [IM002][Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序
  • 神经网络复习--神经网络算法模型及BP算法
  • 【Java】/*方法的使用-快速总结*/
  • kotlin中协程相关
  • (自适应手机端)物流运输快递仓储网站模板 - 带三级栏目
  • Navicat导出表结构到Excel或Word
  • Golang编译优化——稀疏条件常量传播
  • 人工智能培训讲师咨询叶梓介绍及智能医疗技术与ChatGPT临床应用三日深度培训提纲
  • HCIP(BGP综合实验)--8
  • 深入理解C++中的Vector容器:用容器构建高效程序
  • 目标检测YOLO实战应用案例100讲-基于深度学习的交通场景多尺度目标检测算法研究与应用(下)
  • react 类组件 和 函数组件 声明周期 对比
  • 智慧变电站守护者:TSINGSEE青犀AI视频智能管理系统引领行业革新
  • 【Ubuntu20.04安装java-8-openjdk】
  • HTTPS对于网站到底价值几何?
  • Docker私有仓库Harbor
  • 48. 旋转图像/240. 搜索二维矩阵 II
  • wsl安装Xfce桌面并设置系统语言和输入法
  • 短信清空了!华为手机短信删除了怎么恢复?
  • Linux实现Flappy bird项目
  • 【python量化交易】qteasy使用教程07——创建更加复杂的自定义交易策略
  • SpringBoot整合SpringScurity权限控制(菜单权限,按钮权限)以及加上SSH实现安全传输
  • 力扣每日一题119:杨辉三角||
  • AI语音模型PaddleSpeech踩坑(安装)指南
  • 如何更好地使用Kafka? - 运行监控篇
  • 数据可视化训练第四天(模拟投掷筛子并且统计频次)
  • 4.1 编写程序,从键盘接收一个小写字母,然后找出他的前导字符和后续字符,再按顺序显示这三个字符