zoukankan      html  css  js  c++  java
  • 关于tensorflow和numpy版本问题FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated;

    当tensorflow和numpy版本对应出现问题时运行程序会出现以下错误:

    D:anaconda3libsite-packages	ensorflowpythonframeworkdtypes.py:523: 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_qint8 = np.dtype([("qint8", np.int8, 1)])
    D:anaconda3libsite-packages	ensorflowpythonframeworkdtypes.py:524: 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)])
    D:anaconda3libsite-packages	ensorflowpythonframeworkdtypes.py:525: 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_qint16 = np.dtype([("qint16", np.int16, 1)])
    D:anaconda3libsite-packages	ensorflowpythonframeworkdtypes.py:526: 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_quint16 = np.dtype([("quint16", np.uint16, 1)])
    D:anaconda3libsite-packages	ensorflowpythonframeworkdtypes.py:527: 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_qint32 = np.dtype([("qint32", np.int32, 1)])
    D:anaconda3libsite-packages	ensorflowpythonframeworkdtypes.py:532: 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'.

    解决问题的方法是降低numpy的版本:

    方法一:进入pycharm点击文件->设置->Python解释器,找到下载的numpy并双击

    image

    进入后勾选“指定版本”选择较小的numpy版本后点击安装

    image

    方法二:进入anaconda prompt

    输入pip uninstall numpy卸载原有的numpy

    输入pip install numpy=替换版本号

    image

  • 相关阅读:
    WinForm多线程+委托防止界面假死
    C#中异步及winform中界面假死
    js如何判断当前文本的输入状态——中文输入法的那些坑
    数据库主键设计之思考
    node.js使用superagent实现模拟登陆功能(包含下载验证码功能)
    application.properties在Spring Boot项目中的位置
    ubuntu18.04安装chromium浏览器
    ubuntu 18.04安装mysql 8
    Spring Boot学习笔记——搭建一个最简单的hello world
    ubuntu 18.04安装jdk8和eclipse
  • 原文地址:https://www.cnblogs.com/Uriel-w/p/14959677.html
Copyright © 2011-2022 走看看