安装tensorflow遇到:Your CPU supports instructions that this TensorFlow binary was not compiled to use

为了提升CPU计算速度的。若你有支持cuda的GPU,则可以忽略这个问题,因为安装SSE4.1, SSE4.2, AVX, AVX2, FMA, 仅仅提升CPU的运算速度(大概有3倍)。

解决方法:

  1. 忽视警告,并屏蔽警告

开头输入如下:

import os

os.environ[‘TF_CPP_MIN_LOG_LEVEL‘] = ‘2‘

2.进 tensorflow 官网,从源码安装。

原文地址:https://www.cnblogs.com/theWinter/p/8244685.html

时间: 2024-07-30 14:04:03

安装tensorflow遇到:Your CPU supports instructions that this TensorFlow binary was not compiled to use的相关文章

Tensorflow 运行警告提示 Your CPU supports instructions that this TensorFlow binary was not compiled to use

由于现在神经网络这个东西比较火,准确的说是深度学习这个东西比较火,我们实验室准备靠这个东西发几个CCF A类的文章,虽然我不太懂这东西,兴趣也一般都是毕竟要跟随主流的,于是今天安装起了 Tensorflow 这个深度学习的框架. 安装好以后运行一个Demo ,如下: import tensorflow as tf a=tf.constant(2) b=tf.constant(20) with tf.Session() as sess: print(sess.run(a*b)) 运行结果如下: 2

解决tensorflow问题:Your CPU supports instructions that this TensorFlow binary was not compiled to use:

我不知道大家是不是和我一样是用pip install tensorflow安装的tensorflow库,但是使用的时候,却会显示: Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 虽然运行起来没什么问题,但是看着总是不舒服.网上查阅了其他大神的博客之后,终于知道怎么处理了. 首先,卸载原有的Tensorflow 包: pip unistall tensorfl

报错解决——Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2

在导入tensorflow后,进行运算时,出现了报错Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 解决方法:在最顶行写入以下代码即可 import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' 参考资料:Advanced Vector Extensions import os os.environ["TF_CPP_M

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

使用tensorflow时,提示 Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 去掉这个提示信息方法为修改~/.bashrc文件,最后加上一句 export TF_CPP_MIN_LOG_LEVEL=2 执行 source ~/.bashrc 即可 原文地址:https://www.cnblogs.com/liqinggui/p/9533170.html

TensorFlow指定GPU/CPU进行训练和输出devices信息

TensorFlow指定GPU/CPU进行训练和输出devices信息 1.在tensorflow代码中指定GPU/CPU进行训练 with tf.device('/gpu:0'): .... with tf.device('/gpu:1'): ... with tf.device('/cpu:0'): ... 2.输出devices的信息 在指定devices的时候往往不知道具体的设备信息,这时可用下面的代码查看对应的信息 进入Python环境 from tensorflow.python.c

已经安装cuda但是tensorflow仍然使用cpu加速的问题

安装了keras.theano之后,一直以为自己用的GPU,今天找到一个小程序测试一下,竟然一直在用CPU(黑人问号) from theano import function, config, shared, sandbox import theano.tensor as T import numpy import time vlen = 10 * 30 * 768 # 10 x #cores x # threads per core iters = 1000 rng = numpy.rando

限制TensorFlow只在CPU上运行的方法

我们知道安装tensorflow可以安装两个版本的,有cpu和gpu的,如果同时安装的时候会默认进行用gpu进行,那如歌更改为使用cpu呢 在import tensorflow/keras 之前,加入如下代码 import os os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "-1" 原文地址:https:

Windows下caffe安装详解(仅CPU)

本文大多转载自 http://blog.csdn.net/guoyk1990/article/details/52909864,加入部分自己实战心得. 1.环境:windows 7\VS2013 2.caffe-windows准备 (1)下载官方caffe-windows并解压,将 .\windows\CommonSettings.props.example备份,并改名为CommonSettings.props.如图4所示: 图 4:修改后的CommonSettings.props文件 附带说明

Ubuntu 16.04安装N卡驱动、cuda、cudnn和tensorflow GPU版

安装驱动 最开始在英伟达官网下载了官方驱动,安装之后无法登录系统,在登录界面反复循环,用cuda里的驱动也出现了同样的问题.最后解决办法是把驱动卸载之后,通过命令行在线安装驱动. 卸载驱动: sudo nvidia-uninstall 在线安装: sudo apt-add-repository ppa:graphics-drivers/ppa sudo apt-get update sudo apt-get install nvidia-384 #具体驱动版本号可以到官网查 安装完之后,在终端输