2017-09-17 11 views
0

トレーニングを開始すると、プロセスはCPUでのみ発生します。 GPU:Tensorflowオブジェクト検出APIは、エラーのあるCPUでのみ実行されます。デバイス指定/デバイスを無視します。ノード 'prefetch_queue_Dequeue'のGPU:0

は、デバイス仕様/デバイスを無視:0ノード 「prefetch_queue_Dequeue」の 「prefetch_queue」からの入力エッジが基準接続であるため、すでにデバイスを有しており、これは起動時に私が取得メッセージであります /デバイスにフィールドセット:CPU:0

とGPUメモリがいっぱいにされている間、そこGPU負荷の突然のスパイクのみであり、それはほとんど0%です。言うまでもなく、パフォーマンスは非常に遅いです。
enter image description here

CPU使用率がほぼ100%であるので、すべてが代わりにGPUのCPUにロードされているようだ:

enter image description here

私も同じ問題が存在しているUbuntuの中で気づいたが、その少なくとも 私はUbuntu(14.04)とWindowsの両方でtensorflow 1.3.0を使用していて、両方ともpip install --upgrade tensorflow-gpu commandを使用してインストールしています
ここにはwhログ:

G:\Tensorflow_section\models-master\object_detection>python train.py --logtostderr --train_dir=training_stuff --pipeline_config_path=ssd_mobilenet_v1_pets.config 
INFO:tensorflow:Summary name Learning Rate is illegal; using Learning_Rate instead. 
WARNING:tensorflow:From C:\Users\Master\Anaconda3\envs\anaconda35\lib\site-packages\object_detection-0.1-py3.5.egg\object_detection\meta_architectures\ssd_meta_arch.py:607: all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02. 
Instructions for updating: 
Please use tf.global_variables instead. 
INFO:tensorflow:Summary name /clone_loss is illegal; using clone_loss instead. 
2017-09-18 03:44:08.545358: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\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-09-18 03:44:08.545474: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\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-09-18 03:44:09.121357: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:955] Found device 0 with properties: 
name: GeForce GTX 1080 
major: 6 minor: 1 memoryClockRate (GHz) 1.835 
pciBusID 0000:01:00.0 
Total memory: 8.00GiB 
Free memory: 6.63GiB 
2017-09-18 03:44:09.121483: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:976] DMA: 0 
2017-09-18 03:44:09.122196: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:986] 0: Y 
2017-09-18 03:44:09.133158: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:01:00.0) 
INFO:tensorflow:Restoring parameters from training_stuff\model.ckpt-0 
2017-09-18 03:44:15.528390: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\simple_placer.cc:697] Ignoring device specification /device:GPU:0 for node 'prefetch_queue_Dequeue' because the input edge from 'prefetch_queue' is a reference connection and already has a device field set to /device:CPU:0 
INFO:tensorflow:Starting Session. 
INFO:tensorflow:Saving checkpoint to path training_stuff\model.ckpt 
INFO:tensorflow:Starting Queues. 
INFO:tensorflow:global_step/sec: 0 
INFO:tensorflow:Recording summary at step 0. 
INFO:tensorflow:global step 1: loss = 20.1465 (18.034 sec/step) 
INFO:tensorflow:global step 2: loss = 15.8647 (1.601 sec/step) 
INFO:tensorflow:global step 3: loss = 13.3987 (1.540 sec/step) 
INFO:tensorflow:global step 4: loss = 11.5424 (1.562 sec/step) 
INFO:tensorflow:global step 5: loss = 10.8328 (1.337 sec/step) 
INFO:tensorflow:global step 6: loss = 10.7179 (1.317 sec/step) 
INFO:tensorflow:global step 7: loss = 9.7616 (1.369 sec/step) 
INFO:tensorflow:global step 8: loss = 8.5631 (1.336 sec/step) 
INFO:tensorflow:global step 9: loss = 7.2683 (1.384 sec/step) 

どうしたのですか。これを解決するにはどうすればよいですか?

  • OSプラットフォームと流通:binary (used pip install)
  • TensorFlowバージョン(以下useコマンド):1.3.0
  • (ソースまたはバイナリ)からインストール Windows 10 x64 1703, Build 15063.540
  • TensorFlowここ方法によって
    は、いくつかの補足情報であります
  • Pythonバージョン:3.5.3
  • CUDA/cuDNNバージョン:Cuda 8.0 /cudnn v6.0
  • GPUモデルとメモリ:GTX-1080 - 8G

を更新:
次のようにコメントセクションで推奨スニペットの出力は次のとおりです。

import tensorflow as tf 

sess = tf.InteractiveSession() 
with tf.device('/cpu:0'): 
    q = tf.FIFOQueue(3, 'float') 
    add_op = q.enqueue(42) 
with tf.device('/gpu:0'): 
    get_op = q.dequeue() 

sess.run(add_op) 
print(sess.run(get_op)) 

出力:

2017-09-17 23:30:59.539728: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\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-09-17 23:30:59.539857: W C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\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-09-17 23:30:59.856904: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:955] Found device 0 with properties: 
name: GeForce GTX 1080 
major: 6 minor: 1 memoryClockRate (GHz) 1.835 
pciBusID 0000:01:00.0 
Total memory: 8.00GiB 
Free memory: 6.63GiB 
2017-09-17 23:30:59.857034: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:976] DMA: 0 
2017-09-17 23:30:59.858320: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:986] 0: Y 
2017-09-17 23:30:59.858688: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:01:00.0) 
2017-09-17 23:30:59.879245: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\simple_placer.cc:697] Ignoring device specification /device:GPU:0 for node 'fifo_queue_Dequeue' because the input edge from 'fifo_queue' is a reference connection and already has a device field set to /job:localhost/replica:0/task:0/device:CPU:0 
42.0 
+0

あなたはhttps://paste.ee/p/6XXu8のようなことをしていますか?このスクリプトを実行できますか? – Patwie

+0

@Patwie:あなたのscript.pleaseの出力で質問を更新しました – Breeze

+0

これは引用された警告を再確認する必要がありました。コードのスリム化されたバージョンを見ることなく、すべての答えは最大限に推測できるだけです。 – Patwie

答えて

1

OK、私はUbuntuでいくつかのテストを実行しました。ここに私が見つけたものがあります:
計算はGPUUbuntuであり、WindowsTensorflow 1.3ピップを使用してインストールされている)と比較すると、4〜6倍高速です。
GPUCPUを使用し、CPUコアの負荷分散はかなり分散しているようですが、Windows版ではそうではありません。
Windowsの下では、VRAMの7.1ギガバイトがかかるのでGPUを使用しているようですが、CPUの負荷はクレイジーです!ごくわずかなGPUの負荷とは異なり、すべてのコアが最大化され、システム全体の性能が低下します。
さらに詳しい調査の結果、この類似の問題が発生しました:Object detection using GPU on Windows is about 5 times slower than on Ubuntu Tensorflowがバージョン1.2以降に何もしていない、Windows上の依存関係の問題が原因だと言っています!
​​を使用し、GPUとリソースを効率的に利用する予定の場合は、Ubuntuを使用して実験を実行してください。 TensorflowWindowsを気にしないようです!

関連する問題