<ahref="https://github.com/rwightman/pytorch-image-models/edit/master/docs/archived_changes.md"title="Edit this page"class="md-content__button md-icon">
<li>Add first ResMLP weights, trained in PyTorch XLA on TPU-VM w/ my XLA branch. 24 block variant, 79.2 top-1.</li>
<li>Add ResNet51-Q model w/ pretrained weights at 82.36 top-1.<ul>
<li>NFNet inspired block layout with quad layer stem and no maxpool</li>
<li>Same param count (35.7M) and throughput as ResNetRS-50 but +1.5 top-1 @ 224x224 and +2.5 top-1 at 288x288</li>
</ul>
</li>
</ul>
<h3id="may-25-2021">May 25, 2021</h3>
<ul>
<li>Add LeViT, Visformer, Convit (PR by Aman Arora), Twins (PR by paper authors) transformer models</li>
<li>Cleanup input_size/img_size override handling and testing for all vision transformer models</li>
<li>Add <code>efficientnetv2_rw_m</code> model and weights (started training before official code). 84.8 top-1, 53M params.</li>
</ul>
<h3id="may-14-2021">May 14, 2021</h3>
<ul>
<li>Add EfficientNet-V2 official model defs w/ ported weights from official <ahref="https://github.com/google/automl/tree/master/efficientnetv2">Tensorflow/Keras</a> impl.<ul>
<li>v2 models w/ v1 scaling: <code>tf_efficientnetv2_b0</code> through <code>b3</code></li>
<li>Rename my prev V2 guess <code>efficientnet_v2s</code> -><code>efficientnetv2_rw_s</code></li>
<li>Some blank <code>efficientnetv2_*</code> models in-place for future native PyTorch training</li>
</ul>
</li>
</ul>
<h3id="may-5-2021">May 5, 2021</h3>
<ul>
<li>Add MLP-Mixer models and port pretrained weights from <ahref="https://github.com/google-research/vision_transformer/tree/linen">Google JAX impl</a></li>
<li>Add CaiT models and pretrained weights from <ahref="https://github.com/facebookresearch/deit">FB</a></li>
<li>Add ResNet-RS models and weights from <ahref="https://github.com/tensorflow/tpu/tree/master/models/official/resnet/resnet_rs">TF</a>. Thanks <ahref="https://github.com/amaarora">Aman Arora</a></li>
<li>Add CoaT models and weights. Thanks <ahref="https://github.com/morizin">Mohammed Rizin</a></li>
<li>Add new ImageNet-21k weights & finetuned weights for TResNet, MobileNet-V3, ViT models. Thanks <ahref="https://github.com/mrT23">mrT</a></li>
<li>Add GhostNet models and weights. Thanks <ahref="https://github.com/iamhankai">Kai Han</a></li>
<li>Update ByoaNet attention modles<ul>
<li>Improve SA module inits</li>
<li>Hack together experimental stand-alone Swin based attn module and <code>swinnet</code></li>
<li>Consistent '26t' model defs for experiments.</li>
</ul>
</li>
<li>Add improved Efficientnet-V2S (prelim model def) weights. 83.8 top-1.</li>
<li>WandB logging support</li>
</ul>
<h3id="april-13-2021">April 13, 2021</h3>
<ul>
<li>Add Swin Transformer models and weights from <ahref="https://github.com/microsoft/Swin-Transformer">https://github.com/microsoft/Swin-Transformer</a></li>
</ul>
<h3id="april-12-2021">April 12, 2021</h3>
<ul>
<li>Add ECA-NFNet-L1 (slimmed down F1 w/ SiLU, 41M params) trained with this code. 84% top-1 @ 320x320. Trained at 256x256.</li>
<li>Add EfficientNet-V2S model (unverified model definition) weights. 83.3 top-1 @ 288x288. Only trained single res 224. Working on progressive training.</li>
<li>Add ByoaNet model definition (Bring-your-own-attention) w/ SelfAttention block and corresponding SA/SA-like modules and model defs<ul>
<li>Change feature extraction for pre-activation nets (NFNets, ResNetV2) to return features before activation.</li>
</ul>
<h3id="feb-18-2021">Feb 18, 2021</h3>
<ul>
<li>Add pretrained weights and model variants for NFNet-F* models from <ahref="https://github.com/deepmind/deepmind-research/tree/master/nfnets">DeepMind Haiku impl</a>.<ul>
<li>Models are prefixed with <code>dm_</code>. They require SAME padding conv, skipinit enabled, and activation gains applied in act fn.</li>
<li>These models are big, expect to run out of GPU memory. With the GELU activiation + other options, they are roughly ½ the inference speed of my SiLU PyTorch optimized <code>s</code> variants.</li>
<li>Original model results are based on pre-processing that is not the same as all other models so you'll see different results in the results csv (once updated).</li>
<li>Matching the original pre-processing as closely as possible I get these results:<ul>
<li><code>dm_nfnet_f6</code> - 86.352</li>
<li><code>dm_nfnet_f5</code> - 86.100</li>
<li><code>dm_nfnet_f4</code> - 85.834</li>
<li><code>dm_nfnet_f3</code> - 85.676</li>
<li><code>dm_nfnet_f2</code> - 85.178</li>
<li><code>dm_nfnet_f1</code> - 84.696</li>
<li><code>dm_nfnet_f0</code> - 83.464</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3id="feb-16-2021">Feb 16, 2021</h3>
<ul>
<li>Add Adaptive Gradient Clipping (AGC) as per <ahref="https://arxiv.org/abs/2102.06171">https://arxiv.org/abs/2102.06171</a>. Integrated w/ PyTorch gradient clipping via mode arg that defaults to prev 'norm' mode. For backward arg compat, clip-grad arg must be specified to enable when using train.py.<ul>
<li>PyTorch global norm of 1.0 (old behaviour, always norm), <code>--clip-grad 1.0</code></li>
<li>PyTorch value clipping of 10, <code>--clip-grad 10. --clip-mode value</code></li>
<li>AGC performance is definitely sensitive to the clipping factor. More experimentation needed to determine good values for smaller batch sizes and optimizers besides those in paper. So far I've found .001-.005 is necessary for stable RMSProp training w/ NFNet/NF-ResNet.</li>
</ul>
</li>
</ul>
<h3id="feb-12-2021">Feb 12, 2021</h3>
<ul>
<li>Update Normalization-Free nets to include new NFNet-F (<ahref="https://arxiv.org/abs/2102.06171">https://arxiv.org/abs/2102.06171</a>) model defs</li>
</ul>
<h3id="feb-10-2021">Feb 10, 2021</h3>
<ul>
<li>More model archs, incl a flexible ByobNet backbone ('Bring-your-own-blocks')<ul>
<li>GPU-Efficient-Networks (<ahref="https://github.com/idstcv/GPU-Efficient-Networks">https://github.com/idstcv/GPU-Efficient-Networks</a>), impl in <code>byobnet.py</code></li>
<li>RepVGG (<ahref="https://github.com/DingXiaoH/RepVGG">https://github.com/DingXiaoH/RepVGG</a>), impl in <code>byobnet.py</code></li>
<li>classic VGG (from torchvision, impl in <code>vgg</code>)</li>
</ul>
</li>
<li>Refinements to normalizer layer arg handling and normalizer+act layer handling in some models</li>
<li>Default AMP mode changed to native PyTorch AMP instead of APEX. Issues not being fixed with APEX. Native works with <code>--channels-last</code> and <code>--torchscript</code> model training, APEX does not.</li>
<li>Fix a few bugs introduced since last pypi release</li>
</ul>
<h3id="feb-8-2021">Feb 8, 2021</h3>
<ul>
<li>Add several ResNet weights with ECA attention. 26t & 50t trained @ 256, test @ 320. 269d train @ 256, fine-tune @320, test @ 352.<ul>
<li>Remove separate tiered (<code>t</code>) vs tiered_narrow (<code>tn</code>) ResNet model defs, all <code>tn</code> changed to <code>t</code> and <code>t</code> models removed (<code>seresnext26t_32x4d</code> only model w/ weights that was removed).</li>
<li>Support model default_cfgs with separate train vs test resolution <code>test_input_size</code> and remove extra <code>_320</code> suffix ResNet model defs that were just for test.</li>
</ul>
<h3id="jan-30-2021">Jan 30, 2021</h3>
<ul>
<li>Add initial "Normalization Free" NF-RegNet-B* and NF-ResNet model definitions based on <ahref="https://arxiv.org/abs/2101.08692">paper</a></li>
</ul>
<h3id="jan-25-2021">Jan 25, 2021</h3>
<ul>
<li>Add ResNetV2 Big Transfer (BiT) models w/ ImageNet-1k and 21k weights from <ahref="https://github.com/google-research/big_transfer">https://github.com/google-research/big_transfer</a></li>
<li>Add official R50+ViT-B/16 hybrid models + weights from <ahref="https://github.com/google-research/vision_transformer">https://github.com/google-research/vision_transformer</a></li>
<li>ImageNet-21k ViT weights are added w/ model defs and representation layer (pre logits) support<ul>
<li>NOTE: ImageNet-21k classifier heads were zero'd in original weights, they are only useful for transfer learning</li>
</ul>
</li>
<li>Add model defs and weights for DeiT Vision Transformer models from <ahref="https://github.com/facebookresearch/deit">https://github.com/facebookresearch/deit</a></li>
<li>Refactor dataset classes into ImageDataset/IterableImageDataset + dataset specific parser classes</li>
<li>Add Tensorflow-Datasets (TFDS) wrapper to allow use of TFDS image classification sets with train script<ul>
<li>Add improved .tar dataset parser that reads images from .tar, folder of .tar files, or .tar within .tar<ul>
<li>Run validation on full ImageNet-21k directly from tar w/ BiT model: <code>validate.py /data/fall11_whole.tar --model resnetv2_50x1_bitm_in21k --amp</code></li>
</ul>
</li>
<li>Models in this update should be stable w/ possible exception of ViT/BiT, possibility of some regressions with train/val scripts and dataset handling</li>
</ul>
<h3id="jan-3-2021">Jan 3, 2021</h3>
<ul>
<li>Add SE-ResNet-152D weights<ul>
<li>256x256 val, 0.94 crop top-1 - 83.75</li>
<li>320x320 val, 1.0 crop - 84.36</li>
</ul>
</li>
<li>Update results files</li>
</ul>
<h3id="dec-18-2020">Dec 18, 2020</h3>
<ul>
<li>Add ResNet-101D, ResNet-152D, and ResNet-200D weights trained @ 256x256<ul>
<li>Simplify EMA module (ModelEmaV2), compatible with fully torchscripted models</li>
<li>Misc fixes for SiLU ONNX export, default_cfg missing from Feature extraction models, Linear layer w/ AMP + torchscript</li>
<li>PyPi release @ 0.3.2 (needed by EfficientDet)</li>
</ul>
<h3id="oct-30-2020">Oct 30, 2020</h3>
<ul>
<li>Test with PyTorch 1.7 and fix a small top-n metric view vs reshape issue.</li>
<li>Convert newly added 224x224 Vision Transformer weights from official JAX repo. 81.8 top-1 for B/16, 83.1 L/16.</li>
<li>Support PyTorch 1.7 optimized, native SiLU (aka Swish) activation. Add mapping to 'silu' name, custom swish will eventually be deprecated.</li>
<li>Fix regression for loading pretrained classifier via direct model entrypoint functions. Didn't impact create_model() factory usage.</li>
<li>PyPi release @ 0.3.0 version!</li>
</ul>
<h3id="oct-26-2020">Oct 26, 2020</h3>
<ul>
<li>Update Vision Transformer models to be compatible with official code release at <ahref="https://github.com/google-research/vision_transformer">https://github.com/google-research/vision_transformer</a></li>
<li>Add Vision Transformer weights (ImageNet-21k pretrain) for 384x384 base and large models converted from official jax impl<ul>
<li>ViT-B/16 - 84.2</li>
<li>ViT-B/32 - 81.7</li>
<li>ViT-L/16 - 85.2</li>
<li>ViT-L/32 - 81.5</li>
</ul>
</li>
</ul>
<h3id="oct-21-2020">Oct 21, 2020</h3>
<ul>
<li>Weights added for Vision Transformer (ViT) models. 77.86 top-1 for 'small' and 79.35 for 'base'. Thanks to <ahref="https://www.kaggle.com/christofhenkel">Christof</a> for training the base model w/ lots of GPUs.</li>
</ul>
<h3id="oct-13-2020">Oct 13, 2020</h3>
<ul>
<li>Initial impl of Vision Transformer models. Both patch and hybrid (CNN backbone) variants. Currently trying to train...</li>
<li>Adafactor and AdaHessian (FP32 only, no AMP) optimizers</li>
<li>EdgeTPU-M (<code>efficientnet_em</code>) model trained in PyTorch, 79.3 top-1</li>
<li>Pip release, doc updates pending a few more changes...</li>
<li>Support for native Torch AMP and channels_last memory format added to train/validate scripts (<code>--channels-last</code>, <code>--native-amp</code> vs <code>--apex-amp</code>)</li>
<li>Models tested with channels_last on latest NGC 20.08 container. AdaptiveAvgPool in attn layers changed to mean((2,3)) to work around bug with NHWC kernel.</li>
<li>New/updated weights from training experiments<ul>
<li>EfficientNet-B3 - 82.1 top-1 (vs 81.6 for official with AA and 81.9 for AdvProp)</li>
<li>RegNetY-3.2GF - 82.0 top-1 (78.9 from official ver)</li>
<li>CSPResNet50 - 79.6 top-1 (76.6 from official ver)</li>
</ul>
</li>
<li>Add CutMix integrated w/ Mixup. See <ahref="https://github.com/rwightman/pytorch-image-models/pull/218">pull request</a> for some usage examples</li>
<li>Some fixes for using pretrained weights with <code>in_chans</code> != 3 on several models.</li>
</ul>
<h3id="aug-5-2020">Aug 5, 2020</h3>
<p>Universal feature extraction, new models, new weights, new test sets.
* All models support the <code>features_only=True</code> argument for <code>create_model</code> call to return a network that extracts feature maps from the deepest layer at each stride.
* New models
* CSPResNet, CSPResNeXt, CSPDarkNet, DarkNet
* ReXNet
* (Modified Aligned) Xception41/65/71 (a proper port of TF models)
* New trained weights
* SEResNet50 - 80.3 top-1
* CSPDarkNet53 - 80.1 top-1
* CSPResNeXt50 - 80.0 top-1
* DPN68b - 79.2 top-1
* EfficientNet-Lite0 (non-TF ver) - 75.5 (submitted by <ahref="https://github.com/hal-314">@hal-314</a>)
* Add 'real' labels for ImageNet and ImageNet-Renditions test set, see <ahref="results/README.md"><code>results/README.md</code></a>
* Test set ranking/top-n diff script by <ahref="https://github.com/KushajveerSingh">@KushajveerSingh</a>
* Train script and loader/transform tweaks to punch through more aug arguments
* README and documentation overhaul. See initial (WIP) documentation at <ahref="https://rwightman.github.io/pytorch-image-models/">https://rwightman.github.io/pytorch-image-models/</a>
* adamp and sgdp optimizers added by <ahref="https://github.com/hellbell">@hellbell</a></p>
<h3id="june-11-2020">June 11, 2020</h3>
<p>Bunch of changes:
* DenseNet models updated with memory efficient addition from torchvision (fixed a bug), blur pooling and deep stem additions
* VoVNet V1 and V2 models added, 39 V2 variant (ese_vovnet_39b) trained to 79.3 top-1
* Activation factory added along with new activations:
* select act at model creation time for more flexibility in using activations compatible with scripting or tracing (ONNX export)
* hard_mish (experimental) added with memory-efficient grad, along with ME hard_swish
* context mgr for setting exportable/scriptable/no_jit states
* Norm + Activation combo layers added with initial trial support in DenseNet and VoVNet along with impl of EvoNorm and InplaceAbn wrapper that fit the interface
* Torchscript works for all but two of the model types as long as using Pytorch 1.5+, tests added for this
* Some import cleanup and classifier reset changes, all models will have classifier reset to nn.Identity on reset_classifer(0) call
<li>Add ResNeSt models (code adapted from <ahref="https://github.com/zhanghang1989/ResNeSt">https://github.com/zhanghang1989/ResNeSt</a>, paper <ahref="https://arxiv.org/abs/2004.08955">https://arxiv.org/abs/2004.08955</a>))</li>
</ul>
<h3id="may-3-2020">May 3, 2020</h3>
<ul>
<li>Pruned EfficientNet B1, B2, and B3 (<ahref="https://arxiv.org/abs/2002.08258">https://arxiv.org/abs/2002.08258</a>) contributed by <ahref="https://github.com/yoniaflalo">Yonathan Aflalo</a></li>
</ul>
<h3id="may-1-2020">May 1, 2020</h3>
<ul>
<li>Merged a number of execellent contributions in the ResNet model family over the past month<ul>
<li>BlurPool2D and resnetblur models initiated by <ahref="https://github.com/VRandme">Chris Ha</a>, I trained resnetblur50 to 79.3.</li>
<li>TResNet models and SpaceToDepth, AntiAliasDownsampleLayer layers by <ahref="https://github.com/mrT23">mrT23</a></li>
<li>ecaresnet (50d, 101d, light) models and two pruned variants using pruning as per (<ahref="https://arxiv.org/abs/2002.08258">https://arxiv.org/abs/2002.08258</a>) by <ahref="https://github.com/yoniaflalo">Yonathan Aflalo</a></li>
</ul>
</li>
<li>200 pretrained models in total now with updated results csv in results folder</li>
<li>Add some newly trained MobileNet-V2 models trained with latest h-params, rand augment. They compare quite favourably to EfficientNet-Lite<ul>
<li>3.5M param MobileNet-V2 100 @ 73%</li>
<li>4.5M param MobileNet-V2 110d @ 75%</li>
<li>6.1M param MobileNet-V2 140 @ 76.5%</li>
<li>5.8M param MobileNet-V2 120d @ 77.3%</li>
</ul>
</li>
</ul>
<h3id="march-18-2020">March 18, 2020</h3>
<ul>
<li>Add EfficientNet-Lite models w/ weights ported from <ahref="https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet/lite">Tensorflow TPU</a></li>
<li>Add RandAugment trained ResNeXt-50 32x4d weights with 79.8 top-1. Trained by <ahref="https://github.com/andravin">Andrew Lavin</a> (see Training section for hparams)</li>
<li>Add some newly trained MobileNet-V2 models trained with latest h-params, rand augment. They compare quite favourably to EfficientNet-Lite<ul>
<li>3.5M param MobileNet-V2 100 @ 73%</li>
<li>4.5M param MobileNet-V2 110d @ 75%</li>
<li>6.1M param MobileNet-V2 140 @ 76.5%</li>
<li>5.8M param MobileNet-V2 120d @ 77.3%</li>
</ul>
</li>
</ul>
<h3id="march-18-2020_1">March 18, 2020</h3>
<ul>
<li>Add EfficientNet-Lite models w/ weights ported from <ahref="https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet/lite">Tensorflow TPU</a></li>
<li>Add RandAugment trained ResNeXt-50 32x4d weights with 79.8 top-1. Trained by <ahref="https://github.com/andravin">Andrew Lavin</a> (see Training section for hparams)</li>
<li>Big refactor of model layers and addition of several attention mechanisms. Several additions motivated by 'Compounding the Performance Improvements...' (<ahref="https://arxiv.org/abs/2001.06268">https://arxiv.org/abs/2001.06268</a>):<ul>
<li>Full dataset results updated that incl NoisyStudent weights and 2 of the 3 SK weights</li>
</ul>
<h3id="feb-12-2020">Feb 12, 2020</h3>
<ul>
<li>Add EfficientNet-L2 and B0-B7 NoisyStudent weights ported from <ahref="https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet">Tensorflow TPU</a></li>
</ul>
<h3id="feb-6-2020">Feb 6, 2020</h3>
<ul>
<li>Add RandAugment trained EfficientNet-ES (EdgeTPU-Small) weights with 78.1 top-1. Trained by <ahref="https://github.com/andravin">Andrew Lavin</a> (see Training section for hparams)</li>
</ul>
<h3id="feb-12-2020_1">Feb ½, 2020</h3>
<ul>
<li>Port new EfficientNet-B8 (RandAugment) weights, these are different than the B8 AdvProp, different input normalization.</li>
<li>Update results csv files on all models for ImageNet validation and three other test sets</li>
<li>Push PyPi package update</li>
</ul>
<h3id="jan-31-2020">Jan 31, 2020</h3>
<ul>
<li>Update ResNet50 weights with a new 79.038 result from further JSD / AugMix experiments. Full command line for reproduction in training section below.</li>
</ul>
<h3id="jan-1112-2020">Jan 11/12, 2020</h3>
<ul>
<li>Master may be a bit unstable wrt to training, these changes have been tested but not all combos</li>
<li>Implementations of AugMix added to existing RA and AA. Including numerous supporting pieces like JSD loss (Jensen-Shannon divergence + CE), and AugMixDataset</li>
<li>SplitBatchNorm adaptation layer added for implementing Auxiliary BN as per AdvProp paper</li>
<li>ResNet-50 AugMix trained model w/ 79% top-1 added</li>
<li><code>seresnext26tn_32x4d</code> - 77.99 top-1, 93.75 top-5 added to tiered experiment, higher img/s than 't' and 'd'</li>
</ul>
<h3id="jan-3-2020">Jan 3, 2020</h3>
<ul>
<li>Add RandAugment trained EfficientNet-B0 weight with 77.7 top-1. Trained by <ahref="https://github.com/michaelklachko">Michael Klachko</a> with this code and recent hparams (see Training section)</li>
<li>Add <code>avg_checkpoints.py</code> script for post training weight averaging and update all scripts with header docstrings and shebangs.</li>
</ul>
<h3id="dec-30-2019">Dec 30, 2019</h3>
<ul>
<li>Merge <ahref="https://github.com/mehtadushy">Dushyant Mehta's</a> PR for SelecSLS (Selective Short and Long Range Skip Connections) networks. Good GPU memory consumption and throughput. Original: <ahref="https://github.com/mehtadushy/SelecSLS-Pytorch">https://github.com/mehtadushy/SelecSLS-Pytorch</a></li>
<li>Add RandAugment trained MixNet-XL weights with 80.48 top-1.</li>
<li><code>--dist-bn</code> argument added to train.py, will distribute BN stats between nodes after each train epoch, before eval</li>
</ul>
<h3id="dec-4-2019">Dec 4, 2019</h3>
<ul>
<li>Added weights from the first training from scratch of an EfficientNet (B2) with my new RandAugment implementation. Much better than my previous B2 and very close to the official AdvProp ones (80.4 top-1, 95.08 top-5).</li>
<li>Brought EfficientNet and MobileNetV3 up to date with my <ahref="https://github.com/rwightman/gen-efficientnet-pytorch">https://github.com/rwightman/gen-efficientnet-pytorch</a> code. Torchscript and ONNX export compat excluded.<ul>
<li>EfficientNet and MobileNetV3 hook based 'feature extraction' classes added. Will serve as basis for using models as backbones in obj detection/segmentation tasks. Lots more to be done here...</li>
<li>HRNet classification models and weights added from <ahref="https://github.com/HRNet/HRNet-Image-Classification">https://github.com/HRNet/HRNet-Image-Classification</a></li>
<li>Reasonable chance I broke something... let me know</li>
</ul>
<h3id="nov-22-2019">Nov 22, 2019</h3>
<ul>
<li>Add ImageNet training RandAugment implementation alongside AutoAugment. PyTorch Transform compatible format, using PIL. Currently training two EfficientNet models from scratch with promising results... will update.</li>
<li><code>drop-connect</code> cmd line arg finally added to <code>train.py</code>, no need to hack model fns. Works for efficientnet/mobilenetv3 based models, ignored otherwise.</li>
<scriptid="__config"type="application/json">{"base":"..","features":[],"search":"../assets/javascripts/workers/search.2a1c317c.min.js","translations":{"clipboard.copied":"Copied to clipboard","clipboard.copy":"Copy to clipboard","search.config.lang":"en","search.config.pipeline":"trimmer, stopWordFilter","search.config.separator":"[\\s\\-]+","search.placeholder":"Search","search.result.more.one":"1 more on this page","search.result.more.other":"# more on this page","search.result.none":"No matching documents","search.result.one":"1 matching document","search.result.other":"# matching documents","search.result.placeholder":"Type to start searching","search.result.term.missing":"Missing","select.version.title":"Select version"}}</script>