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 ...
随机推荐
- springCloud学习1
传统项目架构 传统项目分为三层架构,将业务逻辑层.数据库访问层.控制层放入在一个项目中. 优点:适合于个人或者小团队开发,不适合大团队开发. 分布式项目架构 根据业务需求进行拆分成N个子系统,多个子系 ...
- Python面向对象 | isinstance和issubclass
isinstance(a,b):判断a是否是b类(或者b类的基类)实例化的对象 class A: pass class B(A): pass obj = B() print(isinstance(ob ...
- postfix发邮件失败,日志和postqueue -p提示No route to host
1. 防火墙未放行相关端口 2
- django中models字段的联合限制
一.字段联合使用的限制设置: 有这么个需求,现有两个字段,A字段是选择用户是不是vip, B字段是统计用户的vip等级; 要求: 用户不是vip时,A选择false,B字段为空; 是vip时,A字段选 ...
- day 19
If you think you can, you can. And if you think you can't, you're right.
- pytorch指定使用的单个GPU
1.pycharm里直接在代码中加入下面 import os os.environ["CUDA_VISIBLE_DEVICES"] = "2" 2.在终端指定使 ...
- 创维(Skyworth)电视 & 小米盒子3增强版
创维(Skyworth)电视 型号:43G7200(8H87) 品类:GLED Air TV OS:酷开64位6.20.80601-806061 兼容Android L CPU:四核 Cortex ...
- Spring Security教程之基于表达式的权限控制(九)
目录 1.1 通过表达式控制URL权限 1.2 通过表达式控制方法权限 1.2.1 使用@PreAuthorize和@PostAuthorize进行访问控制 1.2.2 ...
- python 字典转成对象
database = { "key1": { 'period':999, "data": { 'a':1, 'b':2, } }, "key2&quo ...
- idea导入工程
idea导入svn中的工程,一般是多模块的工程. 1 在idea中导入一个工程的目录,可以建立对应的文件夹 dy-task ,svn选择对应的分支导入 2 在dy-task同目录下建立其他目录 dy- ...