Commit Graph

67 Commits (572f05096aadb3af6fc4ede31a87c832ad918b43)

Author SHA1 Message Date
Ross Wightman cda39b35bd Add a deprecation phase to module re-org 2022-12-09 14:39:45 -08: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 755570e2d6 Rename _pretrained.py -> pretrained.py, not feasible to change the other files to same scheme without breaking uses 2022-12-05 10:21:34 -08:00
Ross Wightman 72cfa57761 Add ported Tensorflow MaxVit weights. Add a few more CLIP ViT fine-tunes. Tweak some model tag names. Improve model tag name sorting. Update HF hub push config layout. 2022-12-05 10:21:34 -08:00
Ross Wightman def68befa7 Updating vit model defs for mult-weight support trial (vit first). Prepping for CLIP (laion2b and openai) fine-tuned weights. 2022-12-05 10:21:34 -08:00
Ross Wightman 0dadb4a6e9 Initial multi-weight support, handled so old pretraing config handling co-exists with new tags. 2022-12-05 10:21:34 -08:00
Ross Wightman e858912e0c Add brute-force checkpoint remapping option 2022-09-23 16:07:03 -07:00
Ross Wightman a383ef99f5 Make huggingface_hub necessary if it's the only source for a pretrained weight 2022-09-23 13:54:21 -07:00
Ross Wightman 9709dbaaa9 Adding support for fine-tune CLIP LAION-2B image tower weights for B/32, L/14, H/14 and g/14. Still WIP 2022-09-15 17:25:59 -07:00
Ross Wightman e6d7df40ec no longer a point using kwargs for pretrain_cfg resolve, just pass explicit arg 2022-06-24 21:36:23 -07:00
Ross Wightman 7d657d2ef4 Improve resolve_pretrained_cfg behaviour when no cfg exists, warn instead of crash. Improve usability ex #1311 2022-06-24 14:55:25 -07:00
Ross Wightman 9a86b900fa Official SwinV2 models 2022-05-12 15:05:10 -07:00
Ross Wightman c5a8e929fb Add initial swinv2 tiny / small weights 2022-04-03 15:22:55 -07:00
Ross Wightman dc51334cdc Fix pruned adapt for EfficientNet models that are now using BatchNormAct layers 2022-03-22 20:33:01 -07:00
Ross Wightman 61d3493f87 Fix hf-hub handling when hf-hub is config source 2022-03-21 11:12:55 -07:00
Ross Wightman 94bcdebd73 Add latest weights trained on TPU-v3 VM instances 2022-03-18 21:35:41 -07:00
Ross Wightman 0557c8257d Fix bug introduced in non layer_decay weight_decay application. Remove debug print, fix arg desc. 2022-02-28 17:06:32 -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 95cfc9b3e8 Merge remote-tracking branch 'origin/master' into norm_norm_norm 2022-01-25 22:20:45 -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 010b486590 Add Dino pretrained weights (no head) for vit models. Add support to tests and helpers for models w/ no classifier (num_classes=0 in pretrained cfg) 2022-01-17 12:20:02 -08:00
Ross Wightman d633a014e6 Post merge cleanup. Fix potential security issue passing kwargs directly through to serialized web data. 2021-11-23 16:54:01 -08:00
Nathan Raw b18c9e323b
Update helpers.py 2021-11-22 23:43:44 -05:00
Nathan Raw 308d0b9554
Merge branch 'master' into hf-save-and-push 2021-11-22 23:39:27 -05:00
Alexander Soare ab3ac3f25b Add FX based FeatureGraphNet capability 2021-11-12 20:45:05 +00:00
Ross Wightman b2094f4ee8 support bits checkpoints in avg/load 2021-10-03 17:31:22 -07:00
nateraw adcb74f87f 🎨 Import load_state_dict_from_url directly 2021-09-14 01:11:40 -04:00
Ross Wightman 8880f696b6 Refactoring, cleanup, improved test coverage.
* Add eca_nfnet_l2 weights, 84.7 @ 384x384
* All 'non-std' (ie transformer / mlp) models have classifier / default_cfg test added
* Fix #694 reset_classifer / num_features / forward_features / num_classes=0 consistency for transformer / mlp models
* Add direct loading of npz to vision transformer (pure transformer so far, hybrid to come)
* Rename vit_deit* to deit_*
* Remove some deprecated vit hybrid model defs
* Clean up classifier flatten for conv classifiers and unusual cases (mobilenetv3/ghostnet)
* Remove explicit model fns for levit conv, just pass in arg
2021-06-12 16:40:02 -07:00
Ross Wightman d7bab8a6c5 Fix strict flag change for checkpoint load. 2021-05-28 09:54:50 -07:00
Ross Wightman bfc72f75d3 Expand scope of testing for non-std vision transformer / mlp models. Some related cleanup and create fn cleanup for all vision transformer and mlp models. More CoaT weights. 2021-05-24 21:13:26 -07:00
Ross Wightman 7953e5d11a Fix pos_embed scaling for ViT and num_classes != 1000 for pretrained distilled deit and pit models. Fix #426 and fix #433 2021-03-31 23:11:28 -07:00
Ross Wightman 45c048ba13 A few minor fixes and bit more cleanup on the huggingface hub integration. 2021-03-17 13:18:52 -07:00
Ross Wightman ead80d33c5 Fix typo, naming consistency 2021-03-16 23:02:51 -07: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
Ross Wightman 4f49b94311 Initial AGC impl. Still testing. 2021-02-15 23:22:44 -08:00
Ross Wightman 0356e773f5 Default to native PyTorch AMP instead of APEX amp. Too many APEX issues cropping up lately. 2021-02-10 14:31:18 -08:00
Ross Wightman b4e216e377 Fix a few small things. 2021-02-09 17:33:43 -08:00
Ross Wightman 9811e229f7 Fix regression in models with 1001 class pretrained weights. Improve batchnorm arg and BatchNormAct layer handling in several models. 2021-02-09 16:22:52 -08:00
Ross Wightman 38d8f67570 Fix potential issue with change to num_classes arg in train/validate.py defaulting to None (rely on model def / default_cfg) 2021-01-25 11:53:34 -08:00
Ross Wightman 855d6cc217 More dataset work including factories and a tensorflow datasets (TFDS) wrapper
* Add parser/dataset factory methods for more flexible dataset & parser creation
* Add dataset parser that wraps TFDS image classification datasets
* Tweak num_classes handling bug for 21k models
* Add initial deit models so they can be benchmarked in next csv results runs
2021-01-15 17:26:20 -08:00
Ross Wightman 231d04e91a ResNetV2 pre-act and non-preact model, w/ BiT pretrained weights and support for ViT R50 model. Tweaks for in21k num_classes passing. More to do... tests failing. 2020-12-28 16:59:15 -08:00
Ross Wightman 867a0e5a04 Add default_cfg back to models wrapped in feature extraction module as per discussion in #294. 2020-12-03 10:24:35 -08:00
Ross Wightman 2ed8f24715 A few more changes for 0.3.2 maint release. Linear layer change for mobilenetv3 and inception_v3, support no bias for linear wrapper. 2020-11-30 16:19:52 -08:00
Ross Wightman da6cd2cc1f Fix regression for pretrained classifier loading when using entrypt functions directly 2020-10-29 15:43:39 -07:00
Ross Wightman 9c297ec67d Cleanup Apex vs native AMP scaler state save/load. Cleanup CheckpointSaver a bit. 2020-09-02 15:12:59 -07:00
Ross Wightman b1b6e7c361 Fix a few more issues related to #216 w/ TResNet (space2depth) and FP16 weights in wide resnets. Also don't completely dump pretrained weights in in_chans != 1 or 3 cases. 2020-08-11 18:57:47 -07: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 7995295968 Merge branch 'logger' into features. Change 'logger' to '_logger'. 2020-07-27 18:00:46 -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 9eba134d79 More models supporting feature extraction, xception, gluon_xception, inception_v3, inception_v4, pnasnet, nasnet, dla. Fix DLA unused projection params. 2020-07-19 14:02:02 -07:00