Keras: невозможно использовать GPU на полную мощность - PullRequest
0 голосов
/ 28 сентября 2018

Когда я запускаю свой код, я получаю это сообщение каждый раз:

2018-09-27 19:31:03.353933: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1405] Found device 0 with properties: 
name: GeForce GTX 650 Ti major: 3 minor: 0 memoryClockRate(GHz): 0.941
pciBusID: 0000:01:00.0
totalMemory: 2.00GiB freeMemory: 1.65GiB
2018-09-27 19:31:03.355743: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Adding visible gpu devices: 0
2018-09-27 19:31:04.822514: I tensorflow/core/common_runtime/gpu/gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-09-27 19:31:04.822895: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971]      0 
2018-09-27 19:31:04.823072: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 0:   N 
2018-09-27 19:31:04.823679: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1416 MB memory) -> physical GPU (device: 0, name: GeForce GTX 650 Ti, pci bus id: 0000:01:00.0, compute capability: 3.0)
2018-09-27 19:31:12.050251: W tensorflow/core/common_runtime/bfc_allocator.cc:219] Allocator (GPU_0_bfc) ran out of memory trying to allocate 261.79MiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory were available.
2018-09-27 19:31:17.191146: W tensorflow/core/common_runtime/bfc_allocator.cc:219] Allocator (GPU_0_bfc) ran out of memory trying to allocate 1.13GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory were available.

Последние 2 сообщения, которые являются предупреждениями, кажутся мне странными: якобы у меня 1,65 ГБ свободной памяти, но некоторыеменьшие суммы не могут быть выделены. Что я мог сделать, чтобы это исправить?Каков источник этого сообщения? Но также: почему я не могу использовать более 50% от моего графического процессора?

Вот как это выглядит, когда я начинаю тренироваться:

Initialization of training

Сам код находится в моем репо (мне сложно понять, какие части моего кода актуальны).

Ответы [ 2 ]

0 голосов
/ 28 сентября 2018

Вы пытались увеличить размер партии?Я вижу из вашего кода, что вы используете batch size = 1

0 голосов
/ 28 сентября 2018

Похоже, вы не используете модель с несколькими графическими процессорами?

см. Например https://www.pyimagesearch.com/2017/10/30/how-to-multi-gpu-training-with-keras-python-and-deep-learning/

...