Closed kraigrs closed 7 years ago
Which GPU are you using? And which neural network model?
Both models are GoogleNet but using different training sets, and I have a single mobile GPU, NVIDIA Quadro K1100M (384 cores, 2GB memory).
Are you thinking that the models themselves are too big?
Yes, that's probably the case. Launch each model separately, send a few images in (to be sure everything is initialized) then check the memory usage of the process using nvidia-smi
on the host.
Here is the output of nvidia-smi
right before I receive the error message from the 2nd deployed model:
Mon Apr 10 16:17:13 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 361.93.02 Driver Version: 361.93.02 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro K1100M On | 0000:01:00.0 On | N/A |
| N/A 51C P0 N/A / N/A | 1996MiB / 1998MiB | 3% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1606 G /usr/lib/xorg/Xorg 137MiB |
| 0 1611 C /usr/bin/python 10MiB |
| 0 2622 G compiz 108MiB |
| 0 7072 G ...s-passed-by-fd --v8-snapshot-passed-by-fd 69MiB |
| 0 9622 C inference 862MiB |
| 0 21166 C inference 802MiB |
+-----------------------------------------------------------------------------+
So it looks like it is in fact getting very close to the limit. Would you recommend training a more lightweight model?
Ouch. Yes you're very very close to the limit. I think GoogleNet is fine, but you either need a GPU with more memory, or kill your X server to free some space.
Referencing #9, I thought I had worked around this, and in practice this works fine to classify images one at a time with multiple models. But when I deployed this in my application where both models are called multiple times per second, I received the following error:
The images that I'm passing to the listener are pretty small, so I don't know how I could run out of memory.
Any help on this would be greatly appreciated.