web-dev-qa-db-fra.com

TensorFlow version 1.0.0-rc2 sous Windows: "OpKernel ('op:" BestSplits "type_périphérique:" CPU "') pour un op inconnu: BestSplits" avec code de test

J'ai installé TensorFlow version 1.0.0-rc2 sur Windows 7 SP1 x64 Ultimate (Python 3.5.2 | Anaconda personnalisé (64 bits)) en utilisant:

pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0rc2-cp35-cp35m-win_AMD64.whl

Lorsque j'essaie d'exécuter le script de test depuis https://web.archive.org/web/20170214034751/https://www.tensorflow.org/get_started/os_setup#test_the_tensorflow_installation dans Eclipse 4.5 ou dans la console:

import tensorflow as tf
print('TensorFlow version: {0}'.format(tf.__version__))
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

J'obtiens un message d'erreur:

TensorFlow version: 1.0.0-rc2
'Hello, TensorFlow!'
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflob
w\core\framework\op_kernel.cc:943] OpKernel ('op: "BestSplits" device_type: "CPU"') for unknown op: BestSplits
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "CountExtremelyRandomStats" device_type: "CPU"') for unknown op: CountExtremelyRandomStats
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "FinishedNodes" device_type: "CPU"') for unknown op: FinishedNodes
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "GrowTree" device_type: "CPU"') for unknown op: GrowTree
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ReinterpretStringToFloat" device_type: "CPU"') for unknown op: ReinterpretStringToFloat
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "SampleInputs" device_type: "CPU"') for unknown op: SampleInputs
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ScatterAddNdim" device_type: "CPU"') for unknown op: ScatterAddNdim
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNInsert" device_type: "CPU"') for unknown op: TopNInsert
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNRemove" device_type: "CPU"') for unknown op: TopNRemove
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TreePredictions" device_type: "CPU"') for unknown op: TreePredictions
E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "UpdateFertileSlots" device_type: "CPU"') for unknown op: UpdateFertileSlots

Pourquoi?

Je n'ai pas eu de tels problèmes avec TensorFlow 0.12.1 (installé avec pip install tensorflow==0.12.1):

TensorFlow version: 0.12.1
b'Hello, TensorFlow!'
18
Franck Dernoncourt

Installer la version nocturne actuelle (version du processeur):

pip install --upgrade http://ci.tensorflow.org/view/Nightly/job/nightly-win/85/DEVICE=cpu,OS=windows/artifact/cmake_build/tf_python/dist/tensorflow-1.0.0rc2-cp35-cp35m-win_AMD64.whl

corrigé le problème (plus de “OpKernel ('op: ”BestSplits“ device_type: ”CPU“') for unknown op: BestSplits” etc.).

Il y a maintenant quelques avertissements SSE:

TensorFlow version: 1.0.0-rc2
b'Hello, TensorFlow!'
2017-02-15 19:56:22.688266: W c:\tf_jenkins\home\workspace\nightly-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.
2017-02-15 19:56:22.688266: W c:\tf_jenkins\home\workspace\nightly-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.
2017-02-15 19:56:22.689266: W c:\tf_jenkins\home\workspace\nightly-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
2017-02-15 19:56:22.689266: W c:\tf_jenkins\home\workspace\nightly-win\device\cpu\os\windows\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-02-15 19:56:22.689266: W c:\tf_jenkins\home\workspace\nightly-win\device\cpu\os\windows\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-02-15 19:56:22.689266: W c:\tf_jenkins\home\workspace\nightly-win\device\cpu\os\windows\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.

dans ce cas, vous pouvez essayer Comment compiler Tensorflow avec les instructions SSE4.2 et AVX?


TensorFlow 1.0.0 a été publié il y a quelques jours. Cependant, il a le même problème. Une construction nocturne plus récente a différents avertissements :

sess = tf.Session()
2017-02-17 13:01:59.790943: W c:\tf_jenkins\home\workspace\nightly-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.

FYI: Binaire macens Tensorflow, compilé avec les optimisations SSE4.1, SSE4.2 et AVX.


Pour masquer les avertissements/erreurs, vous pouvez utiliseros.environ['TF_CPP_MIN_LOG_LEVEL'] = '3', par exemple:

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))

TF_CPP_MIN_LOG_LEVEL:

  • 0: tous les journaux affichés (c'est le paramètre par défaut)
  • 1: filtrer les journaux INFO
  • 2: en plus filtrer les journaux WARNING
  • 3: en plus filtrer les journaux ERROR.
14
Franck Dernoncourt

En se référant aux suggestions ci-dessus, je pense que faire 2 étapes est utile:

1er, mise à niveau du tensorflow:

pip install --upgrade tensorflow==1.1.0rc1

puis, les journaux d’erreur changent dans les journaux d’avertissement:

W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.

Deuxièmement, vous pourrez peut-être supprimer le filtre d’alerte au niveau 2.

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

Je pense que cela fonctionne bien sans filtrer les journaux d'erreurs.

3
Light

Le problème est résolu dans la version 1.1.0rc0 et ultérieure.

Trouvez la dernière version de tensorflow:

pip search --version tensorflow

Mise à niveau du tensorflow:

pip install --upgrade tensorflow==1.1.0rc1
0
Steven Yang

Vous pourrez peut-être supprimer le filtre d'avertissement au niveau 2. Cela fonctionnait pour moi avec TensorFlow 1.0.1 dans une installation virtualenv. 

os.environ ['TF_CPP_MIN_LOG_LEVEL'] = '2'

Sry à propos de la réponse supplémentaire, mais je ne suis pas digne de commenter.

0
GTM