Проблема установки с Tensorflow

Я установил Tensorflow, и он работал хорошо до сих пор. Однако это отображает следующее содержание, когда я выполняю свой код

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.

Я попробовал многих другое решение, но оно не работало. Существует решение с внешней панелью, но я не использую это приложение, я думаю. Как я мог решить эту проблему?


┌─╼ [~]
└────╼ 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

Однако, если я закрою терминал и открою его снова, то я получу ту же ошибку. Как мог сделать отличное решение export TF_CPP_MIN_LOG_LEVEL=3 постоянный?

Заранее спасибо!

1
задан 23 May 2017 в 15:39

1 ответ

Подобный вопрос был отправлен на переполнение стека . Можно проигнорировать эти предупреждения. Если они раздражают Вас, можно замаскировать их с os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3', например:

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))
1
ответ дан 7 December 2019 в 15:36

Другие вопросы по тегам:

Похожие вопросы: