Extend EfficientNet pretrained support to B2-B8
Summary
Adds support for downloading and using pretrained EfficientNet weights for models larger than B1 (B2-B8).
In pytorchcv, the “c” denotes the community re-trained EfficientNet variants (ported via https://www.github.com/rwightman/timm) that use PyTorch-native ops and shapes, distinct from the original TF-trained baselines.
Checklist
- [x] The PR title and description are clear and descriptive
- [x] I have manually tested the changes
- [x] All changes are covered by automated tests
- [x] All related issues are linked to this PR (if applicable)
- [x] Documentation has been updated (if applicable)
[!WARNING]
This PR may increase test runtime because it involves downloading large models.
Since we used base models, we need to be sure that "c" variants are backward compatible and the performance of the b0 backbone remains same or better. Could you provide these evidence?
Hi @kprokofi,
To confirm backward compatibility: all existing unit tests continue to pass, and model calls with dummy inputs execute successfully, indicating that the integration of the "c" variants doesn’t break existing functionality.
The performance improvements for the "c" variants come from the AdvProp paper. I haven't independently benchmarked the b0 backbone myself, but the original authors state that these models match or exceed the baseline performance.