Python3 import tensorflow 出现FutureWarning: Passing (type, 1) or '1type' 问题
解决python调用TensorFlow时出现FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate
最近因为要做一个基于深度学习的人脸识别项目,要用到TensorFlow,但是下载完成后后发现import tensorflow总是出现FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'._np_quint8 = np.dtype([("quint8", np.uint8, 1)])的错误,如图
百度了许多,很多说是numpy的版本不对,换了numpy的版本就行了,但是我换了好几个版本都没用,仍然报错,最后发现,可以在pycharm中使用Import tensorflow,然后将点进出现的警告,进入dtype.py,修改对应行的代码,把np.dtype([("quint8", np.uint8, 1)])修改为np.dtype([("quint8", np.uint8, (1,))])就完美解决了,如图
修改为
Python3 import tensorflow 出现FutureWarning: Passing (type, 1) or '1type' 问题
numpy降级就可以了,import numpy as np -> print(np.__version__),我的是tf-1.14.0,np-1.17.1,将np改为pip install numpy==1.16.0即可
Python3 import tensorflow 出现FutureWarning: Passing (type, 1) or '1type' 问题的更多相关文章
- Numpy版本问题,import tensorflow as tf 报警:“ FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'”
tensorflow成功安装后 import tensorflow as tf 报警:“ FutureWarning: Passing (type, 1) or '1type' as a synony ...
- FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated;
/Users/jerryqi/PycharmProjects/DeepLearning/venv/lib/python3.7/site-packages/tensorflow/python/frame ...
- FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate;的解决办法
踩坑场景 报错FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate; 解决办法 1.升级numpy ...
- 萤火虫系统(firefly) RK3399 python3 安装 tensorflow
前言: 继续之前在RK3399上安装深度学习的一些环境,主要碰到的坑给大家分享一下,为了让大家少走弯路.这次是安装tensorflow,话不多说,直接开撸. --------------------- ...
- python3安装tensorflow遇到的问题
1. 使用命令:sudo pip3 install --upgrade \ https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow ...
- import tensorflow 报错
>>> import tensorflowe:\ProgramData\Anaconda3\lib\site-packages\h5py\__init__.py:36: Future ...
- windows下 python3.5+tensorflow 安装
个人随笔,备忘参考 首先最近的tensorflow 对python3.5.x友好,我先装了Python3.6,查其他的一些博客说出现问题,后来重装3.5.0.下载用迅雷,超快. 安装比较简单,官网下载 ...
- Python3机器学习—Tensorflow数字识别实践
[本文出自天外归云的博客园] Windows下Anaconda+Tensorflow环境部署 1. 安装Anaconda. 2. 开始菜单 > 所有程序 > Anaconda 3 (64- ...
- 在linux上cuda9.0 cudnn7.* 安装python3.6 tensorflow 1.5.1
链接:https://www.jianshu.com/p/bcf37d0e4e9b 为了入门机器学习的小伙伴能安装好工具,特制作此教程 按照 Anaconda 下载网站上的说明下载并安装 Anacon ...
随机推荐
- 第05组 Beta冲刺(1/4)
第05组 Beta冲刺(1/4) 队名:天码行空 组长博客连接 作业博客连接 团队燃尽图(共享): GitHub当日代码/文档签入记录展示(共享): 组员情况: 组员1:卢欢(组长) 过去两天完成了哪 ...
- JavaScript计算时间前一天跟后一天
1.获取当前时 //写在HTML <button onclick="goBefore()">前一天</button> <button onclick= ...
- ESA2GJK1DH1K基础篇: 硬件使用说明
开发板板载介绍 一.示意图 1.单片机:STM32C8T6 2.Wi-Fi模块:ESP8266 3.GPRS模块:Air202 4.温湿度传感器:DHT11 5.液晶:OLED(IIC) 6.继电器 ...
- 设置 npm 源为淘宝镜像
淘宝 npm 网址 https://npm.taobao.org/ 修改 npm config set registry http://registry.npm.taobao.org/ 还原 npm ...
- vs启动报4.X的错
参考: https://www.cnblogs.com/zsx-blog/p/6136956.html https://blog.csdn.net/lishaoran369/article/detai ...
- CentOS7.6安装MYSQL8.0
1.一般CentOS默认安装了mariadb,所以先查看是否安装mariadb,如果安装就需要先卸载mariadbrpm -qa|grep mariadbrpm -e mariadb-libs --n ...
- 课后选做题-MyOD
课后选做题-MyOD od命令的了解 功能 od命令用于将指定文件内容以八进制.十进制.十六进制.浮点格式或ASCII编码字符方式显示,通常用于显示或查看文件中不能直接显示在终端的字符.od命令系统默 ...
- 监听浏览器tab选项卡选中事件,点击浏览器tab标签页回调事件,浏览器tab切换监听事件
js事件注册代码: <script> document.addEventListener('visibilitychange',function(){ //浏览器tab切换监听事件 if( ...
- odoo 币别符号显示机制 Monetary
//-------------------------------------------------------------------basic_fields.js init: function ...
- Python【每日一问】27
问: [基础题1]:将一个正整数分解质因数.例如:输入 90, 打印出 90=2*3*3*5 . [基础题2]:一个数如果恰好等于它的因子之和,这个数就称为“完数” .例如6=1+2+3.请找出 10 ...