I have been looking for an answer on how to load a VGG16 model on a 12 GB GPU and not getting a CUDA out of memory error, but I could not find it yet. The sizes may differ with different architectures of VGG, but I get this error message:

RuntimeError: CUDA out of memory. Tried to allocate 5.49 GiB (GPU 0; 10.92 GiB total capacity; 6.27 GiB already allocated; 4.09 GiB free; 20.64 MiB cached)

I have tried parallelizing the model by increasing the GPU count, but I think we are not able to do that. Is there any way to implement a VGG16 model with 12 GB GPUs? Any help would be appreciated. Thanks.