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

關(guān)于Tensorflow和Keras版本對(duì)照及環(huán)境安裝

 更新時(shí)間:2023年08月16日 10:22:20   作者:小朱小朱絕不服輸  
這篇文章主要介紹了關(guān)于Tensorflow和Keras版本對(duì)照及環(huán)境安裝方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教

在安裝tensorflow環(huán)境的時(shí)候,一定要先弄清楚對(duì)應(yīng)的版本對(duì)應(yīng)的情況,不要上來(lái)就 pip install tensorflow pip install keras 。

最后發(fā)現(xiàn)全是坑。

下面就列一下,tensorflow和keras以及對(duì)應(yīng)的python版本,然后再列一下我成功安裝的流程。

一、Tensorflow、Keras和python版本對(duì)照

二者對(duì)應(yīng)版本號(hào)如表所示(Keras新版本對(duì)Tensorflow老版本不兼容,需注意安裝版本號(hào))

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.

安裝的時(shí)候按照對(duì)應(yīng)的版本進(jìn)行安裝。

二、Tensorflow和Keras安裝流程

這里安裝python=3.6,Tensorflow=2.0,Keras=2.3.1

1. anaconda安裝python環(huán)境

1)在Anaconda Prompt中輸入命令,創(chuàng)建conda環(huán)境

conda create -n tensorflow python=3.6

2)激活環(huán)境

activate tensorflow

2. 安裝Tensorflow

pip install tensorflow==2.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

3. 安裝Keras

pip install keras==2.3.1 -i https://pypi.tuna.tsinghua.edu.cn/simple

結(jié)果查看(切換到python環(huán)境):

在這里插入圖片描述

注意:

如果開(kāi)始你安裝的時(shí)候沒(méi)有注意版本問(wèn)題,直接使用 pip install tensorflow 安裝,安裝過(guò)程中不會(huì)出現(xiàn)問(wèn)題

在import會(huì)報(bào)錯(cuò):

W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

這就是版本不匹配的問(wèn)題,你需要安裝對(duì)應(yīng)版本的tensorflow。

總結(jié)

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

相關(guān)文章

最新評(píng)論

咸宁市| 大港区| 西盟| 满洲里市| 酒泉市| 隆安县| 泗阳县| 卓资县| 香格里拉县| 玉溪市| 乌拉特中旗| 静安区| 古田县| 甘南县| 根河市| 博客| 宁津县| 那坡县| 永登县| 涿鹿县| 思茅市| 册亨县| 岳普湖县| 文登市| 商洛市| 康保县| 阳高县| 衡水市| 天津市| 阿巴嘎旗| 阿拉善左旗| 陆河县| 浦北县| 磐安县| 万年县| 儋州市| 福清市| 葫芦岛市| 开鲁县| 江永县| 车险|