【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’] = ‘–tf_xla_enable_xla_devices’
1
但是此标志最终将在后续发行版中删除。
解决方法
将
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
提示!
【Error】解决: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 ...
- 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-gp ...
- 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 ...
- 彻底解决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 ...
最新文章
- 互联网让我们变笨了吗:过去10年关于大脑的11个有趣发现
- 浅谈使用openwave测试的几个注意项
- kali下利用weeman进行网页钓鱼
- Build Tree
- covariance matrix r语言_时间序列分析|ARIMAX模型分步骤详解和R中实践
- Linux工作笔记-RabbitMQ的安装
- ubuntu安装redis_在Ubuntu上安装Redis
- SQL调优技巧:统计信息(文末福利)
- 开局一张图,理解Vuex
- 用php实现基本功能,php实现文件管理与基础功能操作的方法
- 智库说 | 杨宁:从城市管理走向城市治理 大数据将发挥更大作用
- Kubernetes(k8s) 对象使用
- 【重识云原生】第六章容器基础6.4.10.1节——StatefulSet概述
- sql查询一个班级中男女各有多少人及总人数
- python比较重要的模块_python中重要的模块--asyncio 转载
- Android FMRadio上层调试
- C++中构造函数和析构函数调用的时机
- input元素及属性
- DDS发生器的频率控制字原理和基本结构(二)
- 半导体鼻祖:仙童半导体的故事
热门文章
- GDOI2017旅游记
- java集成微信发送模板消息
- [翻译] Anders Hejlsberg访谈录——Geek of the Week
- 浮华,原来青春是一场梦
- 删除activiti的流程实例报错Process instance is still running, cannot delete historic process instance
- 关于汽车html网页设计完整版,10个以汽车为主题的网页设计与实现
- L2-021 点赞狂魔(Python3)
- 工业相机标定(张正友标定法)
- 使用stream实现两个list集合的合并(对象属性的合并)
- Netgear R6220桥接组网设置