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 ...
随机推荐
- JQuery校验时间大小
常用于按时间条件(起始日-截止日)查询时,进行校验 function checkDate(){ var startTime = $('#startTime').val(); var endTime = ...
- 洛谷P2504 [HAOI2006]聪明的猴子题解
题目 记录悲伤 已知猴子的数量以及猴子跳的最大距离 已知数的数量以及树的坐标 最小生成树 每两棵树之间的距离需要枚举来计算 算出最大值之后再与n只猴子进行比较记录答案 需要注意 在使用最小生成树的时候 ...
- Springboot之自定义配置
SpringBoot自定义配置 springboot在这里就不过多介绍了,大家都应该了解springboot零配置文件,所以配置信息都装配在属性文件(properties.yml.yaml)中,有时我 ...
- Solr的核心操作案例
@Service public class SearchServiceImpl implements SearchService { @Autowired private SolrTemplate s ...
- Spring Security教程(三)
在上一篇博客中讲解了用Spring Security自带的默认数据库存储用户和权限的数据,但是Spring Security默认提供的表结构太过简单了,其实就算默认提供的表结构很复杂,也不一定能满足项 ...
- jquery设置bootstrap-table的当前选中页码的获取与设置
一.获取当前table分页的页码 有两种方式可以获得当前选中的页码: 1.通过table的onPageChange方法 $('#agentTable').bootstrapTable({ data: ...
- react-native字体react-native-vector-icons在ios下的使用
react-native字体react-native-vector-icons在ios下的使用 官网和网上有各种针对ios/android的安装和使用方法:能够使用了,基本就等于安装成功了. reac ...
- LESS是一个CSS预处理器,跨浏览器友好,提供诸如变量,函数, mixins 和操作等功能,可以构建动态CSS
什么是LESS? LESS是一个CSS预处理器,可以为网站启用可自定义,可管理和可重用的样式表. LESS是一种动态样式表语言,扩展了CSS的功能. LESS也是跨浏览器友好. CSS预处理器是一种脚 ...
- scala 项目pom示例
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://mave ...
- Python【每日一问】22
问: [基础题]:输出 9*9 口诀表 [提高题]:古典问题:有一对兔子,从出生后第 3 个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少? ...