最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

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

在Python交互式窗口導(dǎo)入tensorflow出現(xiàn)了下面的錯誤:

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版本后解決了

出錯時(shí)的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'
>>>

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

相關(guān)文章

  • 深入了解Python中的變量類型標(biāo)注

    深入了解Python中的變量類型標(biāo)注

    變量類型注解是用來對變量和函數(shù)的參數(shù)返回值類型做注解,讓調(diào)用方減少類型方面的錯誤,也可以提高代碼的可讀性和易用性。本文就來和大家聊聊Python中的變量類型標(biāo)注吧
    2023-04-04
  • python的變量和簡單數(shù)字類型詳解

    python的變量和簡單數(shù)字類型詳解

    這篇文章給大家詳細(xì)介紹了python的變量和簡單數(shù)字類型,文中介紹的很詳細(xì),相信對大家的理解和學(xué)習(xí)很有幫助,有需要的朋友們可以參考借鑒
    2021-09-09
  • 淺談Python數(shù)據(jù)處理csv的應(yīng)用小結(jié)

    淺談Python數(shù)據(jù)處理csv的應(yīng)用小結(jié)

    這篇文章主要介紹了Python數(shù)據(jù)處理csv的簡單應(yīng)用,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2022-01-01
  • Python內(nèi)建模塊collections實(shí)現(xiàn)特殊容器數(shù)據(jù)類型

    Python內(nèi)建模塊collections實(shí)現(xiàn)特殊容器數(shù)據(jù)類型

    collections模塊是Python的內(nèi)建模塊之一,它實(shí)現(xiàn)了特殊的容器數(shù)據(jù)類型,提供了Python內(nèi)建的數(shù)據(jù)類型dict、list、set、和tuple的高效替代選擇
    2023-06-06
  • python 爬取免費(fèi)簡歷模板網(wǎng)站的示例

    python 爬取免費(fèi)簡歷模板網(wǎng)站的示例

    這篇文章主要介紹了python 爬取免費(fèi)簡歷模板網(wǎng)站的示例,幫助大家更好的理解和使用python 爬蟲,感興趣的朋友可以了解下
    2020-09-09
  • Django之騰訊云短信的實(shí)現(xiàn)

    Django之騰訊云短信的實(shí)現(xiàn)

    這篇文章主要介紹了Django之騰訊云短信的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-06-06
  • Python中字符串的格式化方法小結(jié)

    Python中字符串的格式化方法小結(jié)

    這篇文章主要介紹了Python中字符串的格式化方法小結(jié),提到了針對Python2.x與3.x版本相異情況下的不同技巧,需要的朋友可以參考下
    2016-05-05
  • Python實(shí)現(xiàn)通訊錄功能

    Python實(shí)現(xiàn)通訊錄功能

    這篇文章主要為大家詳細(xì)介紹了Python實(shí)現(xiàn)通訊錄功能,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2018-02-02
  • Python中一些深不見底的“坑”

    Python中一些深不見底的“坑”

    這篇文章主要給大家介紹了關(guān)于Python中一些深不見底的“坑”,文中通過示例代碼介紹的非常詳細(xì),對大家學(xué)習(xí)或者使用Python具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-06-06
  • python進(jìn)程池Pool中apply方法與apply_async方法的區(qū)別

    python進(jìn)程池Pool中apply方法與apply_async方法的區(qū)別

    這篇文章主要介紹了python進(jìn)程池Pool中apply方法與apply_async方法的區(qū)別及說明,具有很好的參考價(jià)值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-02-02

最新評論

泸州市| 通许县| 巴马| 宿松县| 南召县| 西畴县| 临泽县| 林芝县| 布尔津县| 富民县| 梧州市| 高碑店市| 贵阳市| 固原市| 利津县| 横山县| 罗山县| 理塘县| 铁力市| 华容县| 普兰县| 浦江县| 金昌市| 独山县| 军事| 信阳市| 根河市| 遂川县| 固阳县| 临澧县| 汾西县| 五台县| 太仓市| 阿勒泰市| 馆陶县| 萝北县| 内丘县| 公安县| 昆山市| 伊宁县| 吉水县|