Commit Graph

26 Commits (2a84d68d02bc1e84eeec6ce3a0e8febc9e3d7e35)

Author SHA1 Message Date
Ross Wightman b1a6f4a946 Some missed reset_classifier() type annotations 2024-06-16 10:39:27 -07:00
Ross Wightman a5a2ad2e48 Fix consistency, testing for forward_head w/ pre_logits, reset_classifier, models with pre_logits size != unpooled feature size
* add test that model supports forward_head(x, pre_logits=True)
* add head_hidden_size attr to all models and set differently from num_features attr when head has hidden layers
* test forward_features() feat dim == model.num_features and pre_logits feat dim == self.head_hidden_size
* more consistency in reset_classifier signature, add typing
* asserts in some heads where pooling cannot be disabled
Fix #2194
2024-06-07 13:53:00 -07:00
Ross Wightman 150356c493 Fix unfortunate selecsls case bug caused by aggressive IDE rename 2023-08-03 10:37:06 -07:00
Ross Wightman e4e43190ce Add typing to all model entrypoint fns, add old cache check env var to builder 2023-05-08 08:52:38 -07:00
Ross Wightman 3386af8c86 Final push to get remaining models using multi-weight pretrained configs, almost all weights on HF hub 2023-04-26 15:52:13 -07:00
Ross Wightman 927f031293 Major module / path restructure, timm.models.layers -> timm.layers, add _ prefix to all non model modules in timm.models 2022-12-06 15:00:06 -08:00
Ross Wightman 372ad5fa0d Significant model refactor and additions:
* All models updated with revised foward_features / forward_head interface
* Vision transformer and MLP based models consistently output sequence from forward_features (pooling or token selection considered part of 'head')
* WIP param grouping interface to allow consistent grouping of parameters for layer-wise decay across all model types
* Add gradient checkpointing support to a significant % of models, especially popular architectures
* Formatting and interface consistency improvements across models
* layer-wise LR decay impl part of optimizer factory w/ scale support in scheduler
* Poolformer and Volo architectures added
2022-02-28 13:56:23 -08:00
Ross Wightman abc9ba2544 Transitioning default_cfg -> pretrained_cfg. Improving handling of pretrained_cfg source (HF-Hub, files, timm config, etc). Checkpoint handling tweaks. 2022-01-25 21:54:13 -08:00
Ross Wightman d584e7f617 Support for huggingface hub via create_model and default_cfgs.
* improve consistency of model creation helper fns
* add comments to some of the model helpers
* support passing external default_cfgs so they can be sourced from hub
2021-03-16 22:48:26 -07:00
Yusuke Uchida f6b56602f9 fix test_model_default_cfgs 2020-08-11 23:23:57 +09:00
Ross Wightman b1f1a54de9 More uniform treatment of classifiers across all models, reduce code duplication. 2020-08-03 22:18:24 -07:00
Ross Wightman 4e61c6a12d Cleanup, refactoring of Feature extraction code, add tests, fix tests, non hook feature extraction working with torchscript 2020-07-20 16:10:31 -07:00
Ross Wightman 3b9004bef9 Lots of changes to model creation helpers, close to finalizing feature extraction / interfaces 2020-07-17 17:54:26 -07:00
Ross Wightman d23a2697d0 Working on feature extraction, interfaces refined, a number of models working, some in progress. 2020-06-29 18:18:59 -07:00
Ross Wightman eb7653614f Monster commit, activation refactor, VoVNet, norm_act improvements, more
* refactor activations into basic PyTorch, jit scripted, and memory efficient custom auto
* implement hard-mish, better grad for hard-swish
* add initial VovNet V1/V2 impl, fix #151
* VovNet and DenseNet first models to use NormAct layers (support BatchNormAct2d, EvoNorm, InplaceIABN)
* Wrap IABN for any models that use it
* make more models torchscript compatible (DPN, PNasNet, Res2Net, SelecSLS) and add tests
2020-06-01 17:16:52 -07:00
Ross Wightman 0ea53cecc3 Merge branch 'master' into densenet_update_and_more 2020-05-22 16:18:10 -07:00
Ross Wightman afb6bd0669 Add backward and default_cfg tests and fix a few issues found. Fix #153 2020-05-21 15:30:58 -07:00
Vyacheslav Shults a7ebe09029 Replace all None by nn.Identity() in all models reset_classifier when False-values num_classes is given.
Make small code refactoring
2020-05-06 09:54:03 +03:00
Ross Wightman 13746a33fc Big move, layer modules and fn to timm/models/layers 2020-02-09 13:13:08 -08:00
Ross Wightman 19d93fe454 Add selecsls60 weights 2019-12-31 16:49:04 -08:00
Ross Wightman 0062c15fb0 Update checkpoint url with modelzoo compatible ones. 2019-12-30 15:59:19 -08:00
Ross Wightman b5315e66b5 Streamline SelecSLS model without breaking checkpoint compat. Move cfg handling out of model class. Update feature/pooling behaviour to match current. 2019-12-30 15:44:47 -08:00
Ross Wightman d59a756c16 Run PyCharm autoformat on selecsls and change mix cap variables and model names to all lower 2019-12-30 14:30:46 -08:00
Dushyant Mehta 2404361f62 correct asset paths 2019-12-28 23:32:20 +01:00
Dushyant Mehta 31939311f6 Added SelecSLS models 2019-12-28 23:06:00 +01:00
Dushyant Mehta 32012a44fd Added SelecSLS model 2019-12-28 20:41:55 +01:00