解决方法:

如果安装的是GPU版本

如果你有一个GPU,你不应该关心AVX的支持,因为大多数昂贵的操作将被分派到一个GPU设备上(除非明确地设置)。在这种情况下,您可以简单地忽略此警告:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = ''

如果安装的是CPU版本(pip install tensorflow)

1.在代码中加入如下代码,忽略警告:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = ''

2.编译TensorFlow源码
如果您没有GPU并且希望尽可能多地利用CPU,那么如果您的CPU支持AVX,AVX2和FMA,则应该从针对CPU优化的源构建tensorflow。在这个问题中已经讨论过这个问题,也是这个GitHub问题。 Tensorflow使用称为bazel的ad-hoc构建系统,构建它并不是那么简单,但肯定是可行的。在此之后,不仅警告消失,tensorflow性能也应该改善。

参考:

https://blog.csdn.net/hq86937375/article/details/79696023

Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA的更多相关文章

  1. 解决tensorflow的"Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA Using TensorFlow backend."警告问题

    问题描述 程序开始运行的时候报出警告:I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructio ...

  2. 2019-09-16 16:42:03.621946: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA Traceback (most recent cal

    -- ::] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA ...

  3. 警告:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

    加入 import os os.environ[' demo: import os os.environ[' import tensorflow as tf tf.enable_eager_execu ...

  4. 报错Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

    解决方法:import os                  os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'输入1:显示所有信息 2:只显示warning和erro ...

  5. I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 问题

    临时解决版本进入python后只需下面命令 import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

  6. Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

    pycharm运行TensorFlow警告:Your CPU supports instructions that this TensorFlow binary was not compiled to ...

  7. I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

    问题: 安装TensorFlow(CPU版本),使用pip install tensorflow安装,安装一切顺利,但是在跑一个简单的程序时,遇到如下情况: 大概意思是:你的CPU支持AVX扩展,但是 ...

  8. I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

    遇到了这个问题,意思是你的 CPU 支持AVX AVX2 (可以加速CPU计算),但你安装的 TensorFlow 版本不支持 解决:1. 如果是初学者 或者 没有太大计算速度的需求,在开头加上这两行 ...

  9. 报错:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

    1.问题 写了一个简单的单层神经网络跑mnist手写数字集,结果每次fit都会出现dead kernel 很多dead kernel首先不要急着去网上搜dead kernel怎么解决,因为大家出现的原 ...

随机推荐

  1. jmeter压力测试及抓包

    如何使用jmeter进行分布式压力测试? 1.其他的压力机启动jmeter-server 2.在主控机jmeter的配置文件jmeter.properties里面找到,remote_hosts=xx, ...

  2. 使用Holer远程桌面登录家里电脑和公司内网电脑

    1. Holer工具简介 Holer exposes local servers behind NATs and firewalls to the public internet over secur ...

  3. pat 团体赛练习题集 L2-007. 家庭房产

    给定每个人的家庭成员和其自己名下的房产,请你统计出每个家庭的人口数.人均房产面积及房产套数. 输入格式: 输入第一行给出一个正整数N(<=1000),随后N行,每行按下列格式给出一个人的房产: ...

  4. Linux 下wifi 驱动开发(四)—— USB接口WiFi驱动浅析

    源: Linux 下wifi 驱动开发(四)—— USB接口WiFi驱动浅析

  5. No module named scrapy 成功安装scrapy,却无法import的解决方法

    今天本来准备写一个Python的爬虫,然而使用pip安装了Scrapy之后,却无论如何也无法import,显示的结果总是ImportError: No module named Scrapy.网上查阅 ...

  6. 06: dorpzone上传下载

    1.1 dropzone上传下载使用 参考博客:https://www.cnblogs.com/fu-yong/p/9053515.html 1.使用dropzone需要引入文件 <link r ...

  7. 存根类(stub) 是什么意思?有什么作用?(转)

    存根类是一个类,它实现了一个接口,但是实现后的每个方法都是空的.  它的作用是:如果一个接口有很多方法,如果要实现这个接口,就要实现所有的方法.但是一个类从业务来说,可能只需要其中一两个方法.   如 ...

  8. 20145320《WEB基础实践》

    20145320WEB基础实践 实验问题回答 1.什么是表单 表单可以收集用户的信息和反馈意见,是网站管理者与浏览者之间沟通的桥梁. 一个表单有三个基本组成部分: 表单标签 表单域:包含了文本框.密码 ...

  9. 计算多数的乘积(Python实现)

    1 # -*- coding: utf-8 -*- # sum_of_products.py # @author 0yst3r # @description 两数之积及多数之积 # @created ...

  10. js导读,js引入,js选择器,事件,操作页面文档,计算后样式,数据类型

    js导读 ''' js属于编写运行在浏览器上的脚本语言 js采用ECMAScript语法 操作BOM:浏览器对象模型 eg:浏览器上下滑动,浏览器历史记录 操作DOM:文档对象模型 ''' js引入 ...