Underword

地底世界
专注挖洞不填坑
  1. 首页
  2. 编程
  3. Python
  4. Tensorflow
  5. 正文

判断TensorFlow是否可以使用GPU

2021年2月4日 77点热度 0人点赞 0条评论

tensorflow.test.is_gpu_available()

>>> import tensorflow as tf
>>> tensorflow.test.is_gpu_available()
2021-02-04 21:06:25.317017: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 2070 computeCapability: 7.5
coreClock: 1.44GHz coreCount: 36 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
......
2021-02-04 21:06:25.325876: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2021-02-04 21:06:25.328164: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-02-04 21:06:25.328511: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]      0
2021-02-04 21:06:25.329061: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0:   N
2021-02-04 21:06:25.329462: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/device:GPU:0 with 6637 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2070, pci bus id: 0000:01:00.0, compute capability: 7.5)
2021-02-04 21:06:25.330054: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
True

这里返回True即是可用,如果返回了False就是不可用了

本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2021年2月4日

Kami

打赏 点赞

文章评论

取消回复

LPLaser

带二学生

最新 热点 随机
最新 热点 随机
判断TensorFlow是否可以使用GPU 查询Tensorflow可用设备时提示找不到cusolver64_10.dll Numpy中矩阵的切片方法 让Selenium基于Edge执行自动化测试 cookie2json - 将cookie字符串转为Json的便捷工具 Python格式化字符常量 - 更酷的格式化字符串
查询Tensorflow可用设备时提示找不到cusolver64_10.dll判断TensorFlow是否可以使用GPU
SpaceSniffer - 了解你的磁盘空间构成 常用Python语句 - 创建文件夹 如何使用CentOS8制作Raid0 AppData文件夹的区别 中华杯 - Linux模块样题详解 让Selenium基于Edge执行自动化测试
分类目录
  • Alpine
  • C#
  • CentOS
  • Cisco
  • Docker
  • Gradle
  • PHP
  • Podman
  • Python
  • Tensorflow
  • Unity
  • Windows
  • 博客
  • 建模
  • 开发
  • 杂项
  • 比赛
  • 游戏分享
  • 游戏破解
  • 软件分享
标签聚合
Unity python ECS Gradle typecho Docker 游戏破解 Windows

COPYRIGHT © 2020 Underword. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS

沪ICP备2020032896号-1