<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://itecfun.com/extern.php?action=feed&amp;tid=3372&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[个人知识管理站 / Tensorflow 问题及解决方案]]></title>
		<link>http://www.itecfun.com/viewtopic.php?id=3372</link>
		<description><![CDATA[Tensorflow 问题及解决方案 最近发表的帖子。]]></description>
		<lastBuildDate>Wed, 31 Oct 2018 03:50:10 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Tensorflow 问题及解决方案]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=3642#p3642</link>
			<description><![CDATA[<p>环境：windows10(64bit)+python3.6 + tensorflow 1.8.0 </p><p>tensorflow 通过pip install tensorflow 安装完成</p><p>1、Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA<br />问题：你的CPU支持AVX扩展，但你安装的TensorFlow版本无法编译使用。<br />原因是当前TensorFlow的版本不支持cpu的AVX2编译<br />可能是因为安装时使用的pip install tensorflow ，这样默认会下载X86_64的SIMD版本。<br />两种解决办法：<br />&#160; &#160;1）.忽略这个警告，不看它！<br />&#160; <strong> import os<br />&#160; &#160;os.environ[&quot;TF_CPP_MIN_LOG_LEVEL&quot;]=&#039;1&#039; # 这是默认的显示等级，显示所有信息&#160; <br />&#160; &#160;os.environ[&quot;TF_CPP_MIN_LOG_LEVEL&quot;]=&#039;2&#039; # 只显示 warning 和 Error&#160; &#160;<br />&#160; &#160;os.environ[&quot;TF_CPP_MIN_LOG_LEVEL&quot;]=&#039;3&#039; # 只显示 Error</strong></p><p>2.彻底解决，换成支持cpu用AVX2编译的TensorFlow版本。<br />首先，卸载原来版本的TensorFlow<br /><strong><br />pip uninstall tensorflow<br />pip uninstall tensorboard<br />pip uninstall protobuf<br />pip uninstall keras<br /></strong><br />然后到D:\Program Files\Python\Python36\Lib\site-packages 目录下 删除对应的文件夹 tensorflow keras 等</p><p>完成后可以用pip list查看一下所有库，检查是否成功卸载。</p><p>然后去github下载正确的tf版本，Windows<a href="https://github.com/fo40225/tensorflow-windows-wheel" rel="nofollow">点这里下载</a>。其他操作系统可以点这里找到对应的版本。</p><p>这里下载1.11.0\py36\CPU\avx2 版本（tensorflow-1.11.0-cp36-cp36m-win_amd64.whl）</p><br /><p>下载后安装即可：<br /><strong><br />pip install tensorflow-1.11.0-cp36-cp36m-win_amd64.whl </strong></p><p>安装完成再运行程序，执行成功不会报错</p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 31 Oct 2018 03:50:10 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=3642#p3642</guid>
		</item>
	</channel>
</rss>
