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

關(guān)于TensorFlow、Keras、Python版本匹配一覽表

 更新時(shí)間:2024年03月28日 09:32:33   作者:許野平  
這篇文章主要介紹了關(guān)于TensorFlow、Keras、Python版本匹配一覽表,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教

TensorFlow、Keras、Python 版本匹配一覽表

興沖沖裝完軟件,發(fā)現(xiàn)運(yùn)行不了,查了下資料,發(fā)現(xiàn)是TensorFlow、Keras、Python 版本匹配問(wèn)題。

這里提供一個(gè)版本匹配清單,需要嚴(yán)格按此標(biāo)準(zhǔn)安裝。

版本匹配清單

FrameworkEnv nameDescription
TensorFlow 2.2tensorflow-2.2TensorFlow 2.2.0 + Keras 2.3.1 on Python 3.7.
TensorFlow 2.1tensorflow-2.1TensorFlow 2.1.0 + Keras 2.3.1 on Python 3.6.
TensorFlow 2.0tensorflow-2.0TensorFlow 2.0.0 + Keras 2.3.1 on Python 3.6.
TensorFlow 1.15tensorflow-1.15TensorFlow 1.15.0 + Keras 2.3.1 on Python 3.6.
TensorFlow 1.14tensorflow-1.14TensorFlow 1.14.0 + Keras 2.2.5 on Python 3.6.
TensorFlow 1.13tensorflow-1.13TensorFlow 1.13.0 + Keras 2.2.4 on Python 3.6.
TensorFlow 1.12tensorflow-1.12TensorFlow 1.12.0 + Keras 2.2.4 on Python 3.6.
tensorflow-1.12:py2TensorFlow 1.12.0 + Keras 2.2.4 on Python 2.
TensorFlow 1.11tensorflow-1.11TensorFlow 1.11.0 + Keras 2.2.4 on Python 3.6.
tensorflow-1.11:py2TensorFlow 1.11.0 + Keras 2.2.4 on Python 2.
TensorFlow 1.10tensorflow-1.10TensorFlow 1.10.0 + Keras 2.2.0 on Python 3.6.
tensorflow-1.10:py2TensorFlow 1.10.0 + Keras 2.2.0 on Python 2.
TensorFlow 1.9tensorflow-1.9TensorFlow 1.9.0 + Keras 2.2.0 on Python 3.6.
tensorflow-1.9:py2TensorFlow 1.9.0 + Keras 2.2.0 on Python 2.
TensorFlow 1.8tensorflow-1.8TensorFlow 1.8.0 + Keras 2.1.6 on Python 3.6.
tensorflow-1.8:py2TensorFlow 1.8.0 + Keras 2.1.6 on Python 2.
TensorFlow 1.7tensorflow-1.7TensorFlow 1.7.0 + Keras 2.1.6 on Python 3.6.
tensorflow-1.7:py2TensorFlow 1.7.0 + Keras 2.1.6 on Python 2.
TensorFlow 1.5tensorflow-1.5TensorFlow 1.5.0 + Keras 2.1.6 on Python 3.6.
tensorflow-1.5:py2TensorFlow 1.5.0 + Keras 2.0.8 on Python 2.
TensorFlow 1.4tensorflow-1.4TensorFlow 1.4.0 + Keras 2.0.8 on Python 3.6.
tensorflow-1.4:py2TensorFlow 1.4.0 + Keras 2.0.8 on Python 2.
TensorFlow 1.3tensorflow-1.3TensorFlow 1.3.0 + Keras 2.0.6 on Python 3.6.
tensorflow-1.3:py2TensorFlow 1.3.0 + Keras 2.0.6 on Python 2.

附上一段測(cè)試程序(鳶尾花分類簡(jiǎn)化版)

這一段代碼不需要準(zhǔn)備數(shù)據(jù)文件,可直接驗(yàn)證是否可以訓(xùn)練模型。

#ex7-2.py
#導(dǎo)入庫(kù)包
import numpy as np
import keras
import matplotlib.pyplot as plt
from keras.models import Sequential
from keras.layers import Dense
#讀入數(shù)據(jù)
train_x = np.array([[1.4, 0.2],
                        [1.7, 0.4],
                        [1.5, 0.4],
                        [2.3, 0.7],
                        [2.7, 1.1],
                        [2.6, 0.9],
                        [4.6, 1.3],
                        [3.5, 1.0],
                        [3.9, 1.2]])
train_y = np.array([[1, 0, 0],
                        [1, 0, 0],
                        [1, 0, 0],
                        [0, 1, 0],
                        [0, 1, 0],
                        [0, 1, 0],
                        [0, 0, 1],
                        [0, 0, 1],
                        [0, 0, 1]])
#搭建模型
model = Sequential()
model.add(Dense(units = 2, input_dim = 2))
#model.add(Dense(units = 2, input_dim = 2, activation = 'sigmoid'))
model.add(Dense(units = 3, activation = 'softmax'))
#編譯模型
model.compile(optimizer = 'adam', loss = 'mse')
#訓(xùn)練模型
model.fit(x = train_x, y = train_y, epochs = 10000)
#保存模型
keras.models.save_model(model, 'iris2.model')

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • python中字典元素的創(chuàng)建、獲取和遍歷等字典知識(shí)點(diǎn)

    python中字典元素的創(chuàng)建、獲取和遍歷等字典知識(shí)點(diǎn)

    本文介紹了Python中的字典操作,包括字典的創(chuàng)建、元素獲?。ㄊ褂面I和get()方法)、刪除與清空(del和clear())、增加新鍵值對(duì)、修改已有值、獲取鍵、值和鍵值對(duì)以及遍歷字典的方法,同時(shí)闡述了字典的特點(diǎn),如鍵的唯一性和無(wú)序性,以及字典生成式的使用
    2024-11-11
  • Python打印獲取異常信息的代碼詳解

    Python打印獲取異常信息的代碼詳解

    在日常的軟件開(kāi)發(fā)工作中,異常處理(Exception Handling)是一個(gè)至關(guān)重要的環(huán)節(jié),它不僅影響到程序的穩(wěn)定性和健壯性,還在提高用戶體驗(yàn)、調(diào)試問(wèn)題以及防止安全漏洞方面起到了不可替代的作用,本文給大家介紹了Python打印獲取異常信息,需要的朋友可以參考下
    2024-10-10
  • 使用Pytorch訓(xùn)練two-head網(wǎng)絡(luò)的操作

    使用Pytorch訓(xùn)練two-head網(wǎng)絡(luò)的操作

    這篇文章主要介紹了使用Pytorch訓(xùn)練two-head網(wǎng)絡(luò)的操作,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2021-05-05
  • pytorch中Tensor.to(device)和model.to(device)的區(qū)別及說(shuō)明

    pytorch中Tensor.to(device)和model.to(device)的區(qū)別及說(shuō)明

    這篇文章主要介紹了pytorch中Tensor.to(device)和model.to(device)的區(qū)別及說(shuō)明,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-07-07
  • python操作注冊(cè)表的方法實(shí)現(xiàn)

    python操作注冊(cè)表的方法實(shí)現(xiàn)

    Python提供了winreg模塊,可以用于操作Windows注冊(cè)表,本文就來(lái)介紹一下python操作注冊(cè)表的方法實(shí)現(xiàn),主要包括打開(kāi)注冊(cè)表、讀取注冊(cè)表值、寫(xiě)入注冊(cè)表值和關(guān)閉注冊(cè)表,具有一定的參考價(jià)值,感興趣的可以了解一下
    2023-08-08
  • Python 3.10 的首個(gè) PEP 誕生,內(nèi)置類型 zip() 迎來(lái)新特性(推薦)

    Python 3.10 的首個(gè) PEP 誕生,內(nèi)置類型 zip() 迎來(lái)新特性(推薦)

    這篇文章主要介紹了Python 3.10 的首個(gè) PEP 誕生,內(nèi)置類型 zip() 迎來(lái)新特性,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2020-07-07
  • python3在各種服務(wù)器環(huán)境中安裝配置過(guò)程

    python3在各種服務(wù)器環(huán)境中安裝配置過(guò)程

    這篇文章主要介紹了python3在各種服務(wù)器環(huán)境中安裝配置過(guò)程,源碼包編譯安裝步驟詳解,本文通過(guò)圖文并茂的形式給大家介紹的非常詳細(xì),需要的朋友可以參考下
    2022-01-01
  • python批量從es取數(shù)據(jù)的方法(文檔數(shù)超過(guò)10000)

    python批量從es取數(shù)據(jù)的方法(文檔數(shù)超過(guò)10000)

    今天小編就為大家分享一篇python批量從es取數(shù)據(jù)的方法(文檔數(shù)超過(guò)10000),具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2018-12-12
  • python用字符組成圖像代碼實(shí)例

    python用字符組成圖像代碼實(shí)例

    大家好,本篇文章主要講的是python用字符組成圖像代碼實(shí)例,感興趣的同學(xué)趕快來(lái)看一看吧,對(duì)你有幫助的話記得收藏一下,方便下次瀏覽
    2022-01-01
  • GitHub上值得推薦的8個(gè)python 項(xiàng)目

    GitHub上值得推薦的8個(gè)python 項(xiàng)目

    GitHub 無(wú)疑是代碼托管領(lǐng)域的先行者,Python 作為一種通用編程語(yǔ)言,已經(jīng)被千千萬(wàn)萬(wàn)的開(kāi)發(fā)人員用來(lái)構(gòu)建各種有意思或有用的項(xiàng)目。以下我們會(huì)介紹一些使用 Python 構(gòu)建的GitHub上優(yōu)秀的項(xiàng)目。
    2020-10-10

最新評(píng)論

屯门区| 龙川县| 华亭县| 沿河| 宿松县| 西盟| 五莲县| 疏勒县| 汝州市| 永兴县| 阜城县| 黄龙县| 桃园市| 水城县| 凭祥市| 洛阳市| 东辽县| 台江县| 凤山市| 沾益县| 万州区| 晋城| 彭泽县| 河南省| 毕节市| 竹山县| 桓仁| 孝感市| 广元市| 格尔木市| 扎兰屯市| 巨鹿县| 瑞丽市| 山丹县| 遂宁市| 林西县| 略阳县| 化德县| 桦甸市| 资源县| 汤阴县|