欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

tensorflow與numpy的版本兼容性問題的解決

 更新時間:2021年01月08日 10:27:08   作者:極客字節(jié)  
這篇文章主要介紹了tensorflow與numpy的版本兼容性問題的解決,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧

在Python交互式窗口導入tensorflow出現了下面的錯誤:

root@ubuntu:~# python3 
Python 3.6.8 (default, Oct 7 2019, 12:59:55) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf;
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:516: 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)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:517: 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)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:518: 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)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:519: 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)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:520: 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)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.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_resource = np.dtype([("resource", np.ubyte, 1)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: 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)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: 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)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: 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)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: 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)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: 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)])
/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: 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_resource = np.dtype([("resource", np.ubyte, 1)])

我的錯誤原因是numpy的版本較高造成的,換成1.14.0版本后解決了

出錯時的Numpy版本

root@ubuntu:~# pip3 show numpy
Name: numpy
Version: 1.17.3
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: None
License: BSD
Location: /usr/local/lib/python3.6/dist-packages
Requires: 

安裝1.14.0的Numpy版本

root@ubuntu:~# pip3 install numpy==1.14.0
Collecting numpy==1.14.0
 Downloading https://files.pythonhosted.org/packages/dc/ac/5c270dffb864f23315e9c1f9e0a0b300c797b3c170666c031c4de42aacae/numpy-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (17.2MB)
  100% |████████████████████████████████| 17.2MB 75kB/s 
Installing collected packages: numpy
Successfully installed numpy-1.14.0
root@ubuntu:~# python3
Python 3.6.8 (default, Oct 7 2019, 12:59:55) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf;
>>> tf.__version__
'1.14.0'
>>>

到此這篇關于tensorflow與numpy的版本兼容性問題的解決的文章就介紹到這了,更多相關tensorflow與numpy版本兼容性內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

相關文章

  • python Gunicorn服務器使用方法詳解

    python Gunicorn服務器使用方法詳解

    這篇文章主要介紹了python Gunicorn服務器使用方法詳解,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友可以參考下
    2019-07-07
  • Python中尋找數據異常值的3種方法

    Python中尋找數據異常值的3種方法

    這篇文章主要介紹了Python中尋找數據異常值的3種方法,文章圍繞主題展開詳細的內容介紹,具有一定的參考價值,需要的小伙伴可以參考一下
    2022-08-08
  • Python?正則表達式基礎知識點及實例

    Python?正則表達式基礎知識點及實例

    在本篇文章里小編給大家整理了關于Python正則表達式的一些基礎知識點以及相關用法實例內容,需要的朋友們可以參考下。
    2021-12-12
  • python pandas消除空值和空格以及 Nan數據替換方法

    python pandas消除空值和空格以及 Nan數據替換方法

    今天小編就為大家分享一篇python pandas消除空值和空格以及 Nan數據替換方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2018-10-10
  • 利用Python的裝飾器解決Bottle框架中用戶驗證問題

    利用Python的裝飾器解決Bottle框架中用戶驗證問題

    這篇文章主要介紹了Python的Bottle框架中解決用戶驗證問題,代碼基于Python2.x版本,需要的朋友可以參考下
    2015-04-04
  • Python學習筆記之函數的參數和返回值的使用

    Python學習筆記之函數的參數和返回值的使用

    這篇文章主要介紹了Python學習筆記之函數的參數和返回值的使用,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2019-11-11
  • 30行Python代碼實現高分辨率圖像導航的方法

    30行Python代碼實現高分辨率圖像導航的方法

    這篇文章主要介紹了30行Python代碼實現高分辨率圖像導航的方法,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2020-05-05
  • Pygame游戲開發(fā)之太空射擊實戰(zhàn)敵人精靈篇

    Pygame游戲開發(fā)之太空射擊實戰(zhàn)敵人精靈篇

    相信大多數8090后都玩過太空射擊游戲,在過去游戲不多的年代太空射擊自然屬于經典好玩的一款了,今天我們來自己動手實現它,在編寫學習中回顧過往展望未來,下面開始講解敵人精靈的使用
    2022-08-08
  • python pptx復制指定頁的ppt教程

    python pptx復制指定頁的ppt教程

    今天小編就為大家分享一篇python pptx復制指定頁的ppt教程,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2020-02-02
  • 用python實現爬取奧特曼圖片實例

    用python實現爬取奧特曼圖片實例

    大家好,本篇文章主要講的是用python實現爬取奧特曼圖片實例,感興趣的同學趕快來看一看吧,對你有幫助的話記得收藏一下
    2022-02-02

最新評論