首页 > Python资料 博客日记
深度学习 | 基于 CPU 的 tensorflow + keras + python 版本对照及环境安装
2024-02-25 21:00:05Python资料围观353次
本篇文章分享深度学习 | 基于 CPU 的 tensorflow + keras + python 版本对照及环境安装,对你有帮助的话记得收藏一下,看Python资料网收获更多编程知识
Hi,大家好,我是源于花海。要让一个基于 CPU 的 tensorflow 和 keras 开发的深度学习模型正确运行起来,配置环境是个重要的问题,本文介绍了 tensorflow 和 keras 和对应的 python 版本以及安装环境的部分流程。
目录
一、tensorflow + keras + python 版本对照
一、tensorflow + keras + python 版本对照
详情看 tensorflow 官网链接如下:
Build from source on Windows | TensorFlow (google.cn)
Framework | Python version | Description |
---|---|---|
TensorFlow 2.9 | 3.7.-3.10. | TensorFlow 2.9.0 + Keras |
TensorFlow 2.8 | 3.7.-3.10. | TensorFlow 2.8.0 + Keras |
TensorFlow 2.7 | 3.7.-3.9. | TensorFlow 2.7.0 + Keras |
TensorFlow 2.6 | 3.6.-3.9. | TensorFlow 2.6.0 + Keras 2.6.0 |
TensorFlow 2.5 | 3.6.-3.9. | TensorFlow 2.5.0 + Keras 2.5 |
TensorFlow 2.4 | 3.6.-3.8. | TensorFlow 2.4.0 + Keras 2.4.3 |
TensorFlow 2.3 | 3.5.-3.8. | TensorFlow 2.3.0 + Keras 2.4.3 |
TensorFlow 2.2 | 3.7. | TensorFlow 2.2.0 + Keras 2.3.1 |
TensorFlow 2.1 | 3.6. | TensorFlow 2.1.0 + Keras 2.3.1 |
TensorFlow 2.0 | 3.6. | TensorFlow 2.0.0 + Keras 2.3.1 |
TensorFlow 1.15 | 3.6. | TensorFlow 1.15.0 + Keras 2.3.1 |
TensorFlow 1.14 | 3.6. | TensorFlow 1.14.0 + Keras 2.2.5 |
TensorFlow 1.13 | 3.6. | TensorFlow 1.13.0 + Keras 2.2.4 |
TensorFlow 1.12 | 3.6. | TensorFlow 1.12.0 + Keras 2.2.4 |
2. | TensorFlow 1.12.0 + Keras 2.2.4 | |
TensorFlow 1.11 | 3.6. | TensorFlow 1.11.0 + Keras 2.2.4 |
2. | TensorFlow 1.11.0 + Keras 2.2.4 | |
TensorFlow 1.10 | 3.6. | TensorFlow 1.10.0 + Keras 2.2.0 |
2. | TensorFlow 1.10.0 + Keras 2.2.0 | |
TensorFlow 1.9 | 3.6. | TensorFlow 1.9.0 + Keras 2.2.0 |
2. | TensorFlow 1.9.0 + Keras 2.2.0 | |
TensorFlow 1.8 | 3.6. | TensorFlow 1.8.0 + Keras 2.1.6 |
2. | TensorFlow 1.8.0 + Keras 2.1.6 | |
TensorFlow 1.7 | 3.6. | TensorFlow 1.7.0 + Keras 2.1.6 |
2. | TensorFlow 1.7.0 + Keras 2.1.6 | |
TensorFlow 1.5 | 3.6. | TensorFlow 1.5.0 + Keras 2.1.6 |
2. | TensorFlow 1.5.0 + Keras 2.0.8 | |
TensorFlow 1.4 | 3.6. | TensorFlow 1.4.0 + Keras 2.0.8 |
2. | TensorFlow 1.4.0 + Keras 2.0.8 | |
TensorFlow 1.3 | 3.6. | TensorFlow 1.3.0 + Keras 2.0.6 |
2. | TensorFlow 1.3.0 + Keras 2.0.6 |
二、tensorflow 和 keras 安装流程
这里安装 python=3.8,tensorflow=2.4.0,keras=2.4.3(segnet 是我做的语义分割项目的虚拟环境),若需要将创建的虚拟环境添加到 jupyter lab/notebook 中使用,则需要第 3 - 6 步,否则不用:
# 1. Anaconda 创建虚拟环境
conda create -n segnet python=3.8
# 2. 激活并进入虚拟环境
activate segnet
# 3. 安装 ipykernel
pip install ipykernel -i https://pypi.tuna.tsinghua.edu.cn/simple/
# 4. 安装ipykernel,将虚拟环境加入 jupyter 内核中
python -m ipykernel install --name segnet --display-name segnet
# 5. 检查新虚拟环境是否成功加入内核
jupyter kernelspec list
# 6. 从指定文件夹里进入 jupyter
jupyter lab
# 7. 安装 tensorflow、keras 等软件包
pip install tensorflow=2.4.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install keras=2.4.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
------------------------------------------------------------------------
pip install matplotlib=3.4.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install numpy=1.19.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pillow=10.2.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install scipy=1.7.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:jacktools123@163.com进行投诉反馈,一经查实,立即删除!
标签:
相关文章
最新发布
- 【Python系列】SQLAlchemy 基本介绍
- 【Python】selenium 的EC.presence_of_element_located 和 EC.element_to_be_clickable 的区别
- 从零到一!超详细Pycharm安装教程(图解+详细步骤)
- python json jsonl 的用法
- 【Python篇】深度探索NumPy(下篇):从科学计算到机器学习的高效实战技巧
- boto3:Python连接S3对象存储并进行文件操作(上传、下载、删除)
- 全网最适合入门的面向对象编程教程:50 Python函数方法与接口-接口和抽象基类
- Python pycryptodome类库使用学习总结
- import torch 报错:WinError 126
- 如何在Java中实现邮件发送功能?
点击排行
- 版本匹配指南:Numpy版本和Python版本的对应关系
- Python 可视化 web 神器:streamlit、Gradio、dash、nicegui;低代码 Python Web 框架:PyWebIO
- 版本匹配指南:PyTorch版本、torchvision 版本和Python版本的对应关系
- 相关性分析——Pearson相关系数+热力图(附data和Python完整代码)
- Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based proj
- Python pyinstaller打包exe最完整教程
- Anaconda版本和Python版本对应关系(持续更新...)
- Python与PyTorch的版本对应