Input size for EfficientNet versions from torchvision.models

Hi guys!
I’m doing some experiments with the EfficientNet as a backbone.
I’m using the pre-trained EfficientNet models from torchvision.models.
As I found from the paper and the docs of Keras, the EfficientNet variants have different input sizes as below.


Is it true for the models in Pytorch?
If I want to keep the same input size for all the EfficientNet variants, will it affect the performance of the models?

Yes, the torchvision EfficienNet models also expect a different input shape as described in the docs:

The sizes of the EfficientNet models depend on the variant. For the exact input sizes check here

where the link points to:

    elif args.model.startswith('efficientnet_'):
        sizes = {
            'b0': (256, 224), 'b1': (256, 240), 'b2': (288, 288), 'b3': (320, 300),
            'b4': (384, 380), 'b5': (489, 456), 'b6': (561, 528), 'b7': (633, 600),
        }
1 Like

Hello @ptrblck.

Do you know if that sizes are still used in torchvision v.12.0 ?
I can not find any information or reference in the documentation or v0.12.0 code

Thanks

You can read more information about each model by selecting it from here. which also describes the input size.

1 Like

Thanks for your answer.
As you said, that is in the v0.13 but I am still in the v0.12 and documentation says nothing, check out this example or this :slight_smile:

That’s why I wonder about if the pre-processes in v0.13 and v0.12 are the same

For older versions you could use my previously posted link and change the branch to 0.12: Models and pre-trained weights — Torchvision 0.12 documentation

1 Like