question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to train efficientnet on CIFAR-10 or CIFAR-100? Image size is 32x32.

See original GitHub issue

The default model input size is 224~600. What adjustments should I make to fit CIFAR-10’s 32x32?

def efficientnet_params(model_name):
    """ Map EfficientNet model name to parameter coefficients. """
    params_dict = {
        # Coefficients:   width,depth,res,dropout
        'efficientnet-b0': (1.0, 1.0, 224, 0.2),
        'efficientnet-b1': (1.0, 1.1, 240, 0.2),
        'efficientnet-b2': (1.1, 1.2, 260, 0.3),
        'efficientnet-b3': (1.2, 1.4, 300, 0.3),
        'efficientnet-b4': (1.4, 1.8, 380, 0.4),
        'efficientnet-b5': (1.6, 2.2, 456, 0.4),
        'efficientnet-b6': (1.8, 2.6, 528, 0.5),
        'efficientnet-b7': (2.0, 3.1, 600, 0.5),
    }
    return params_dict[model_name]

https://github.com/lukemelas/EfficientNet-PyTorch/blob/master/efficientnet_pytorch/utils.py#L101-L114

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:10
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
daixiangzicommented, Jul 17, 2019

today i test cifar-10(raw image is 32*32) 1.use efficientnet-b3 input_size is 300,but acc is very low 2.use efficientnet-b3 input_size is modified 32,the result is normal on conclusion,need model input_size to fit raw image size??

3reactions
HoracceFengcommented, Oct 8, 2019

Just an update: change image size to any nums seems OK since the maxpool and pad will do the work. I finally use 32*2=64 as input. Everything go smooth. I think this issue can be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. There are 50000 training images and...
Read more >
CIFAR 100: Transfer Learning using EfficientNet
EfficientNet -B0 model architecture requires the image to be of size (224, 224). So, let us resize our images of size (32, 32)...
Read more >
CIFAR-100 Benchmark (Image Classification)
Rank Model Percentage correct Year Tags 1 EffNet‑L2 (SAM) 96.08 2020 EfficientNet 2 Swin‑L + ML‑Decoder 95.1 2021 3 µ2Net (ViT‑L/16) 94.95 2022
Read more >
Fine-tuning EfficientNetB0 on CIFAR-100 | Kaggle
datasets , one should make Internet setting be on. cifar-100 contains 50,000 training data and 10,000 testing data each of which is 32...
Read more >
EFFICIENTNEXT: EFFICIENTNET FOR EMBEDDED SYSTEMS
Train EfficientNet network on CIFAR-10 to establish baseline performance ... observed in development of EfficientNetV1, training on large image sizes was ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found