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

  • 相关阅读:
    electron webview加载远程preload方法
    vue 2.0使用笔记
    关于node的setTimeout的延时最大限制
    javascript的未知尺寸图片保持比例水平垂直居中函数
    node的“宏任务(macro-task)”和“微任务(micro-task)”机制
    windows git gui右键sublime/vs code打开当前文件编辑
    一个JavaScript组件都需要哪些基础api
    点击label时click事件被触发两次的坑
    javascript iframe相关操作
    javascript 写了个字符串组合的情况
  • 原文地址:https://www.cnblogs.com/Uriel-w/p/14959677.html
Copyright © 2011-2022 走看看