老师,mmdetection训练VOC数据集时遇到:
RuntimeError: CUDA out of memory. Tried to allocate 68.00 MiB (GPU 0; 5.81 GiB total capacity; 4.44 GiB already allocated; 55.00 MiB free; 4.72 GiB reserved in total by PyTorch)
但是,我的nvidia-smi查看GPU占用不多,如下:
±----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=++==============|
| 0 GeForce GTX 166… Off | 00000000:01:00.0 Off | N/A |
| N/A 41C P8 5W / N/A | 268MiB / 5944MiB | 3% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+
网上都说改batch_size,我找不到在哪,请问老师怎么解决?(黔驴技穷,心态已崩)