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

  • 相关阅读:
    Visual Studio 2010单元测试(2)--运行测试并查看代码覆盖率
    实用设计模式之观察者模式
    并查集简单题pku1611
    HDU 4534 郑厂长系列故事——新闻净化(AC自动机+DP)
    求 小于 n 的 质数 几种方式
    MySQL数据库高并发优化配置
    MySQL 对于千万级的大表要怎么优化?
    mysql数据库优化总结
    php 正则表达式怎么匹配标签里面的style?
    MySql数据库优化可以从哪几个方面进行?
  • 原文地址:https://www.cnblogs.com/Uriel-w/p/14959677.html
Copyright © 2011-2022 走看看