惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Security @ Cisco Blogs
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
腾讯CDC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
F
Full Disclosure
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Threatpost
I
Intezer
V2EX - 技术
V2EX - 技术
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
小众软件
小众软件
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
N
News | PayPal Newsroom
MyScale Blog
MyScale Blog
AI
AI
Vercel News
Vercel News
Spread Privacy
Spread Privacy
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
Help Net Security
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
L
LINUX DO - 热门话题
U
Unit 42
L
LangChain Blog
Recent Announcements
Recent Announcements

博客园 - 黄彬子

【转】Go语言:编译后文件体积过大解决方案 【转】使用 UPX 压缩可执行文件 Go语言获取路径的文件名、后缀 go - 如何将gin模式设置为release模式? 【Golang学习】SVG图片的生成 【Golang标准库】flag 【Golang踩过的坑】exported function Script should have comment or be unexported wget配置文件的使用:代理设置与不检查证书 Rust Crates 源使用帮助 2020大风口!什么是图神经网络?有什么用?终于有人讲明白了 2020必火的图神经网络(GNN)是什么?有什么用? 【每天学习一点点】Tensorflow 版本与CUDA版本 【每天学习一点点】使用plot_model绘制网络模式失败 【每天学习一点点】keras cifar10.load_data()自己下载数据 【每天学习一点点】Tensorflow2.X 运行问题:Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED 【每天学习一点点】mxnet 版本运行失败问题 【每天学习一点点】不再显示I信息(Tensorflow GPU) 【每天学习一点点】numpy中的reshape中参数为-1 Putty与Xming组合应用
【每天学习一点点】Tensorflow GPU与CPU版本
黄彬子 · 2020-07-21 · via 博客园 - 黄彬子

从 TensorFlow 2.1 开始,pip 包 tensorflow 即同时包含 GPU 支持,无需通过特定的 pip 包 tensorflow-gpu 安装 GPU 版本。

如果对 pip 包的大小敏感,可使用 tensorflow-cpu 包安装仅支持 CPU 的 TensorFlow 版本。

  1. TensorFlow 2.1 默认安装(pip install tensorflow)就已经同时支持 CPU 和 GPU,可以使用

    cpus = tf.config.list_physical_devices (device_type=‘CPU’)
    tf.config.set_visible_devices (devices=cpus)

来限定只使用 CPU 进行运算。

posted @ 2020-07-21 16:31  黄彬子  阅读(676)  评论(0)    收藏  举报

刷新页面返回顶部