Problema de instalação com o Tensorflow

1

Eu instalei o Tensorflow e funcionou bem até agora. No entanto, ele exibe o seguinte conteúdo quando eu executo meu código

2017-05-07 12:35:10.449884: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-07 12:35:10.449909: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-07 12:35:10.449919: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-05-07 12:35:10.449927: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-07 12:35:10.449934: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.

Eu tentei muitas soluções diferentes, mas não funcionou. Existe uma solução com bazel , mas eu não uso este aplicativo, eu acho. Como eu poderia resolver esse problema?

┌─╼ [~]
└────╼ python3 test.py
2017-05-07 13:23:04.148596: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-07 13:23:04.148624: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-07 13:23:04.148629: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-05-07 13:23:04.148633: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-07 13:23:04.148637: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Tensor("add:0", shape=(), dtype=int32)
5
┌─╼ [~]
└────╼ export TF_CPP_MIN_LOG_LEVEL=3
┌─╼ [~]
└────╼ python3 test.py
Tensor("add:0", shape=(), dtype=int32)
5

No entanto, se eu fechar o terminal e abri-lo novamente, recebo o mesmo erro. Como poderia tornar a ótima solução export TF_CPP_MIN_LOG_LEVEL=3 permanente?

Obrigado antecipadamente!

    
por David Hilbert 07.05.2017 / 19:11

1 resposta

1

Uma pergunta semelhante foi postada em estouro de pilha . Você pode ignorar esses avisos. Se eles o incomodarem, você pode mascará-los com os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' , por exemplo:

import tensorflow as tf
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
print('TensorFlow version: {0}'.format(tf.__version__))
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
    
por Franck Dernoncourt 07.05.2017 / 19:18

Tags