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 ...
随机推荐
- The happy secret to better work,https://www.ted.com/talks/shawn_achor_the_happy_secret_to_better_work/transcript#t-100352
When I was seven years old and my sister was just five years old, we were playing on top of a bunk b ...
- 7.Go退出向Consuk反注册服务,优雅关闭服务
注册和反注册代码 package utils import ( consulapi "github.com/hashicorp/consul/api" "log" ...
- Codeforces Round 561(Div 2)题解
这是一场失败的比赛. 前三题应该是随便搞的. D有点想法,一直死磕D,一直WA.(赛后发现少减了个1……) 看E那么多人过了,猜了个结论交了真过了. 感觉这次升的不光彩……还是等GR3掉了洗掉这次把, ...
- 请教网友:#pragma pack(push) #pragma pack(pop)无效
//try 一 try #pragma back(push) #pragma pack(2) struct E { char a; short b; double c; float d; char e ...
- SUSE12.2 编译usbutils
折腾了两天,终于交叉编译出来lsusb命令可以在单板上跑起来,记录一下 1:编译eudev下载地址:https://dev.gentoo.org/~blueness/eudev/,版本eudev-3. ...
- 每日一问:谈谈对 MeasureSpec 的理解
作为一名 Android 开发,正常情况下对 View 的绘制机制基本还是耳熟能详的,尤其对于经常需要自定义 View 实现一些特殊效果的同学. 网上也出现了大量的 Blog 讲 View 的 onM ...
- libevent笔记5:水位watermarks
bufferevent中提供了对读写回调的触发条件及最大缓存长度的设置,即低高水位: 低水位:是读写回调函数的最低触发数据长度,当输入/输出缓存区中的数据长度小于低水位时,读/写回调函数不会被触发: ...
- Java基础之十六 数组
数组:可以创建并组装它们,通过使用整型索引值访问它们的元素,并且它们的尺寸不能改变. 16.1 数组为什么特殊 数组与其他种类的容器之间的区别有三方面:效率,类型和保存基本类型的能力. 数组是一种效率 ...
- Apache Beam实战指南 | 大数据管道(pipeline)设计及实践
Apache Beam实战指南 | 大数据管道(pipeline)设计及实践 mp.weixin.qq.com 策划 & 审校 | Natalie作者 | 张海涛编辑 | LindaAI 前 ...
- button 在chrome浏览器下被点击时会出现一个橙色的边框
问题描述: button在chrome浏览器下被点击时会出现一个橙色的边框 在button上添加 :focus{outline:none;}也无法解决. 解决办法: 在button上添加 :focus ...