Tensorflow不使用GPU(根据TensorBoard)
编辑:GTX 1070,ubuntu 16.04,git哈希: 3B75EB34EA2C4982FB80843BE089F02D430立面 我正在根据自己的数据重新训练模型。一切正常,直到最后命令:Tensorflow不使用GPU(根据TensorBoard),tensorflow,gpu,tensorboard,Tensorflow,Gpu,Tensorboard,编辑:GTX 1070,ubuntu 16.04,git哈希: 3B75EB34EA2C4982FB80843BE089F02D430立面 我正在根据自己的数据重新训练模型。一切正常,直到最后命令: bazel-bin/inception/flowers_train \ --config=cuda \ --train_dir="${TRAIN_DIR}" \ --data_dir="${OUTPUT_DIRECTORY}" \ --pretrained_model_checkpo
bazel-bin/inception/flowers_train \
--config=cuda \
--train_dir="${TRAIN_DIR}" \
--data_dir="${OUTPUT_DIRECTORY}" \
--pretrained_model_checkpoint_path="${MODEL_PATH}" \
--fine_tune=True \
--initial_learning_rate=0.001 \
--input_queue_memory_factor=1
根据日志,Tensorflow似乎正在使用GPU:
I tensorflow/core/common_runtime/gpu/gpu_device.cc:951] Found device 0 with properties:
name: GeForce GTX 1070
major: 6 minor: 1 memoryClockRate (GHz) 1.7715
pciBusID 0000:03:00.0
Total memory: 7.92GiB
Free memory: 7.77GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:972] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] 0: Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1070, pci bus id: 0000:03:00.0)
但是当我在TensorBoard中检查学习时,网络主要使用CPU(蓝色/设备:CPU:0,绿色/设备:GPU:0):
张力球板图:
我尝试了两种TensorFlow设置:
watch nvidia smi
可提供:
2016年10月10日星期一10:31:04
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.48 Driver Version: 367.48 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1070 Off | 0000:03:00.0 On | N/A |
| 29% 57C P2 41W / 230W | 7806MiB / 8113MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1082 G /usr/lib/xorg/Xorg 69MiB |
| 0 3082 C /usr/bin/python 7729MiB |
+-----------------------------------------------------------------------------+
而top提供:
PID UTIL。PR NI VIRT RES SHR S%CPU%MEM TEMPS+COM。
3082根20 0 26739G 3469G 1657G S 101,3 59,7 7254:50 python
GPU似乎被忽略了…根据《盗梦空间》的说法,大部分工作都是在“塔楼”进行的。所以看起来基本上没问题
不过还是有点奇怪。
运行watch nvidia smi
可提供:
2016年10月10日星期一10:31:04
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.48 Driver Version: 367.48 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1070 Off | 0000:03:00.0 On | N/A |
| 29% 57C P2 41W / 230W | 7806MiB / 8113MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1082 G /usr/lib/xorg/Xorg 69MiB |
| 0 3082 C /usr/bin/python 7729MiB |
+-----------------------------------------------------------------------------+
而top提供:
PID UTIL。PR NI VIRT RES SHR S%CPU%MEM TEMPS+COM。
3082根20 0 26739G 3469G 1657G S 101,3 59,7 7254:50 python
GPU似乎被忽略了…okkkk。此时,我正在从docker图像运行tensorflow。在这种情况下,
watch nvidia smi
似乎不可靠。ok。此时,我正在从docker图像运行tensorflow。在这种情况下,watch nvidia smi
似乎不可靠。
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.48 Driver Version: 367.48 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1070 Off | 0000:03:00.0 On | N/A |
| 29% 57C P2 41W / 230W | 7806MiB / 8113MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1082 G /usr/lib/xorg/Xorg 69MiB |
| 0 3082 C /usr/bin/python 7729MiB |
+-----------------------------------------------------------------------------+