我正在使用 tensorpack 训练GAN,训练完成后,这是日志文件:
Future<Person?>
这是 nvidia-smi 信息
2019-04-19 10:14:19.311373: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2019-04-19 10:14:19.374343: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:895] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-04-19 10:14:19.374547: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1105] Found device 0 with properties:
name: GeForce GTX 1060 3GB major: 6 minor: 1 memoryClockRate(GHz): 1.759
pciBusID: 0000:01:00.0
totalMemory: 2.94GiB freeMemory: 2.17GiB
2019-04-19 10:14:19.374562: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1195] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1060 3GB, pci bus id: 0000:01:00.0, compute capability: 6.1)
[0419 10:14:20 @base.py:211] Initializing the session ...
[0419 10:14:20 @base.py:218] Graph Finalized.
[0419 10:14:20 @concurrency.py:37] Starting EnqueueThread QueueInput/input_queue ...
[0419 10:14:20 @base.py:250] Start Epoch 1
...
[0419 10:25:45 @base.py:250] Start Epoch 5
100%|#######################################|10000/10000[02:51<00:00,58.38it/s]
[0419 10:28:36 @base.py:260] Epoch 5 (global_step 50000) finished, time:2 minutes 51 seconds.
如您所见,培训是在GPU上运行的,只花了几分钟就完成了一个纪元。 但是,在完成培训后,将恢复检查点。但是我发现它是在CPU而非GPU上还原的 这是日志文件和 nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.130 Driver Version: 384.130 |
|-------------------------------+----------------------+----------------------+
| 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 106... Off | 00000000:01:00.0 On | N/A |
| 59% 67C P2 74W / 120W | 965MiB / 3010MiB | 93% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1371 G /usr/lib/xorg/Xorg 313MiB |
| 0 2293 G compiz 192MiB |
| 0 2823 G ...uest-channel-token=17545882067829269512 131MiB |
| 0 7632 G ...-token=7C806614AA650E661A2E8895D83D4B4E 41MiB |
| 0 7824 G /opt/teamviewer/tv_bin/TeamViewer 13MiB |
| 0 28413 C python3 269MiB |
+-----------------------------------------------------------------------------+
为什么恢复检查点在CPU而不是GPU上运行?我花了很长时间在CPU上恢复检查点。如何配置以在GPU上还原检查点?