cnn-models icon indicating copy to clipboard operation
cnn-models copied to clipboard

running VGG19_BN pretrained model need so much GPU memory

Open xiaoxingzeng opened this issue 6 years ago • 3 comments

Hi thanks for your sharing, I running VGG19_BN caffemodel in py-faster-rcnn , the input size is 550, the wierd thing is GPU memory reaching up to 10G. VGG19_BN need more GPU memory than ResNet101? Thanks for your reply

xiaoxingzeng avatar Jan 23 '18 05:01 xiaoxingzeng

Which ResNet implementation are you using? Usually VGG is smaller than ResNet-50, and hence also much smaller than ResNet-101 also for such a large input size. What is the batch size if 10GB of memory is used?

MarcelSimon avatar Jan 23 '18 08:01 MarcelSimon

hi, i have encountered the same things. I set the batch size equal 1 for the purpose of extracting the image feature. And the vgg19 network does not work either, the input image size is about 1024*768. Thanks for your response.

Niudong avatar Jan 26 '18 08:01 Niudong

This kind of resolution (>1000px) is too high for a VGG19 with Batch Normalization in caffe. If you really want to train with this image size, you should merge the BatchNorm and Scale layers into the Convolutional layers, then it might work, but most likely it will still take too much memory. Even VGG16 would be borderline for this.

MarcelSimon avatar Jan 26 '18 08:01 MarcelSimon