Tensorflow 报错 The TensorFlow library wasn't compiled to use FMA instructions, ......

Tensorflow CPU version will pop up a warning when the code is running

The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.

The general meaning is that the TF library is not compiled and cannot use SSE, FMA and other instructions, but they can be used to speed up your CPU calculations, which only affects the CPU. If you are using the GPU version of tensorflow, all operations on the GPU are not Will benefit from the SSE directive.

So it does not affect the operation, so add two lines of code at the head of the code to turn off the prompt function.

import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import tensorflow as tf

Guess you like

Origin www.cnblogs.com/ctgu/p/12682082.html