Ubuntu18解决:Not creating XLA devices, tf_xla_enable_xla_devices not set
实验环境
ubuntu18
NVIDIA GeForce GTX 1050
CUDA11.0
CUDNN 8.0
Tesorflow-gpu 2.4.1
问题
分析原因
据说是Tesorflow-gpu 2.4.1,默认情况下,不再注册XLA:CPU和XLA:GPU设备。如果确实需要它们,请可使用
os.environ['TF_XLA_FLAGS'] = '--tf_xla_enable_xla_devices'
但是此标志最终将在后续发行版中删除。
解决方法
将
import tensorflow as tf
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'print(tf.__version__)
a = tf.constant(1.)
b = tf.constant(2.)
print(a+b)
print('GPU:', tf.test.is_gpu_available())
改为
import tensorflow as tf
import os
os.environ['TF_XLA_FLAGS'] = '--tf_xla_enable_xla_devices'
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
print(tf.__version__)
a = tf.constant(1.)
b = tf.constant(2.)
print(a+b)
print('GPU:', tf.test.is_gpu_available())
即可
你将会发现,在代码开头加了
os.environ['TF_XLA_FLAGS'] = '--tf_xla_enable_xla_devices'
将不会有
Not creating XLA devices, tf_xla_enable_xla_devices not set
提示!
Ubuntu18解决:Not creating XLA devices, tf_xla_enable_xla_devices not set相关推荐
- 解决:Not creating XLA devices, tf_xla_enable_xla_devices not set
解决:Not creating XLA devices, tf_xla_enable_xla_devices not set 实验环境 提示如下 分析原因 解决方法 实验环境 Windows 10 N ...
- win10系统tensorflow2.4.0-gpu安装“Not creating XLA devices, tf_xla_enable_xla_devices not set”解决方法
未解决前报错 最近在安装tensorflow2.4.0-gpu版本后的项目开发过程中出现了"Not creating XLA devices, tf_xla_enable_xla_dev ...
- 【Error】解决:Not creating XLA devices, tf_xla_enable_xla_devices not set
提示如下 分析原因 据说是Tesorflow-gpu 2.4.1,默认情况下,不再注册XLA:CPU和XLA:GPU设备.如果确实需要它们,请可使用 os.environ['TF_XLA_FLAGS' ...
- 彻底解决conda环境下 tensorflow gpu版本出现的问题:Not creating XLA devices, tf_xla_enable_xla_devices not set
问题说明 tf.test.is_gpu_available()结果为TRUE,但有Not creating XLA devices, tf_xla_enable_xla_devices not set ...
- tensorflow:Not creating XLA devices, tf_xla_enable_xla_devices not set
运行代码出现 I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_d ...
- Linux conda tensorflow-gpu安装及Not creating XLA devices, tf_xla_enable_xla_devices not set相关问题解决
0.首先介绍一下conda创建虚拟环境的基本操作. (1)创建Python的虚拟环境,并指定Python版本,不指定的话会使用默认的版本(Conda Base 环境中的Python版本). conda ...
- 安装Tensorflow 报错false Not creating XLA devices, tf_xla_enable_xla_devices not set
学习图像识别配置环境 https://blog.csdn.net/weixin_44170512/article/details/103990592 一步一步按照博主配置 执行到这两句 import ...
- Not creating XLA devices, tf_xla_enable_xla_devices not set错误求助
在pycharm中跑代码出现 在调试的时候出现了Not creating XLA devices, tf_xla_enable_xla_devices not set,但是测试的时候却是显示true ...
- CUDA安装 + tensorflow gpu版本出现的问题:Not creating XLA devices, tf_xla_enable_xla_devices not set
装完后用以下两行代码测试,结果竟然是False,输出了图片中的报错,肯定是哪装的有问题 import tensorflow as tf tf.test.is_gpu_available() 我的ten ...
最新文章
- Linux驱动框架之framebuffer驱动框架
- MyEclipse中删除对Struts、hibernate、spring的支持
- 详解SQL Server连接(内连接、外连接、交叉连接)
- AI加剧贫富分化不可避免,我们的职业会发生哪些变化?
- 手机web——自适应网页设计(html/css控制) - 51CTO.COM
- java学习(3):学生管理系统3
- Mac OS X 完全卸载MySQL
- java 文件比对(四)-- 使用 diffutils
- 杀软和防火墙简单列表
- 为什么很多开发都要转测试....详谈....
- 计算机系统时间错了,电脑时间同步出错怎么办
- Qt creator开发的C++应用程序运行崩溃,异常代码0xc0000409,错误偏移量0x0009efbb解决。
- 新手如何做自媒体赚钱?天天看头条却不赚钱,这份资料对你有启发
- 计算机日历算法流程图,计算机日历
- mac电脑usb连接android手机,Android安卓设备连接Mac的方法
- 神经网络整合算法是什么,神经网络整合算法实例
- Twitter 账号爬取
- 【OpenCV入门教程之十七】OpenCV重映射 SURF特征点检测合辑
- yml和properties的区别
- 简单响应式Bootstrap框架中文官网页面模板