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

  • 相关阅读:
    单表查询
    解读python中SocketServer源码
    C++实训(2.3)
    C++实训(2.2)
    C++实训(2.1)
    C++实训(1.3)
    C++实训(1.1)
    顺序表的实现,在vs2019上运行成功
    p243_5(3)
    自考新教材-p176_5(2)
  • 原文地址:https://www.cnblogs.com/jackchen-Net/p/8080532.html
Copyright © 2011-2022 走看看