efficientnet icon indicating copy to clipboard operation
efficientnet copied to clipboard

ResourceExhaustedError while using EfficientNet

Open talhaanwarch opened this issue 5 years ago • 2 comments

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.

talhaanwarch avatar Feb 28 '20 17:02 talhaanwarch

Have you tried with lesser batch size?

Samjith888 avatar Mar 03 '20 13:03 Samjith888

It seems EfficientNet consumes more GPU memory than Resnet and Densenet. Has anyone solved the issue?

RunningDongxu avatar Mar 21 '20 21:03 RunningDongxu