zoukankan      html  css  js  c++  java
  • 1.0Tensorflow中出现编译问题的解决方案


    跑简单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工具进行源码安装

  • 相关阅读:
    POJ1034 The dog task
    POJ1033 Defragment
    POJ1032 Parliament
    POJ1031 Fence
    POJ1030 Rating
    POJ1029 False coin
    伪元素的使用
    伪元素选择器:before 以及 :after
    jquery html() 和text()的用法
    用CSS绘制三角形
  • 原文地址:https://www.cnblogs.com/jackchen-Net/p/8080532.html
Copyright © 2011-2022 走看看