ResourceExhaustedError while using EfficientNet
I am using google colab. While using EfficientNetB3 i am getting the following error
Resource exhausted: OOM when allocating tensor with shape[15,95,95,192] and type float
I understand this because my data does not fit in GPU. But when I try InceptionResNetV2 i did not get any error.
Number of trainable parameters in EfficientNetB3 is 22,220,824
Number of trainable parameters in InceptionResNetV2 is 109,380,744
Number of trainable parameters in InceptionResNetV2 are 5 time more than EfficientNetB3. So I am expecting InceptionResNetV2to throw error not EfficientNetB3.
Any idea why I am getting resource error in EfficientNetB3?
Note: I am using two parallel networks and these parameters are the sum of both network's parameters.
Have you tried with lesser batch size?
It seems EfficientNet consumes more GPU memory than Resnet and Densenet. Has anyone solved the issue?