首页 > 其他 > 详细

1.0Tensorflow中出现编译问题的解决方案

时间:2017-12-21 15:13:19      阅读:278      评论:0      收藏:0      [点我收藏+]

跑简单tf例程的时候遇到这个
sess = tf.Session(),I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX, 

为什么会出现这个问题?

为了提升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://stackoverflow.com/questions/47068709/your-cpu-supports-instructions-that-this-tensorflow-binary-was-not-compiled-to-u?answertab=votes#tab-top

  技术分享图片

      需要bazel工具进行源码安装

 

1.0Tensorflow中出现编译问题的解决方案

原文:http://www.cnblogs.com/jackchen-Net/p/8080532.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!