Commit Graph

2227 Commits (2bfa5e5d742e2362ccca2fbf8610005834f24619)
 

Author SHA1 Message Date
Ross Wightman 2bfa5e5d74 Remove JIT activations, take jit out of ME activations. Remove other instances of torch.jit.script. Breaks torch.compile and is much less performant. Remove SpaceToDepthModule 2024-05-06 16:32:49 -07:00
Ross Wightman 07535f408a Add AttentionExtract helper module 2024-05-04 14:10:00 -07:00
Ross Wightman 45b7ae8029 forward_intermediates() support for byob/byoanet models 2024-05-04 14:06:52 -07:00
Ross Wightman c4b8897e9e attention -> attn in davit for model consistency 2024-05-04 14:06:11 -07:00
Ross Wightman cb57a96862 Fix early stop for efficientnet/mobilenetv3 fwd inter. Fix indices typing for all fwd inter. 2024-05-04 10:21:58 -07:00
Ross Wightman 01dd01b70e forward_intermediates() for MlpMixer models and RegNet. 2024-05-04 10:21:03 -07:00
Ross Wightman f8979d4f50 Comment out time local files while testing new vit weights 2024-05-03 20:26:56 -07:00
Ross Wightman 3e7ab12af9
Merge pull request #2165 from huggingface/more_vits_better_getter
Add features_intermediate() support to coatnet, maxvit, swin*. Tweak feature extraction interfaces. Prep new vit weights while testing.
2024-05-03 19:26:01 -07:00
Ross Wightman c719f7eb86 More forward_intermediates() updates
* add convnext, resnet, efficientformer, levit support
* remove kwargs only for fn so that torchscript isn't broken for all :(
* use reset_classifier() consistently in prune
2024-05-03 16:22:32 -07:00
Ross Wightman 301d0bb21f Stricter check on pool_type for adaptive pooling module. Fix #2159 2024-05-03 16:16:51 -07:00
Ross Wightman d6da4fb01e Add forward_intermediates() to efficientnet / mobilenetv3 based models as an exercise. 2024-05-02 14:19:16 -07:00
Ross Wightman c22efb9765 Add wee & little vits for some experiments 2024-05-02 10:51:35 -07:00
Ross Wightman 67332fce24 Add features_intermediate() support to coatnet, maxvit, swin* models. Refine feature interface. Start prep of new vit weights. 2024-04-30 16:56:33 -07:00
Ross Wightman 62516d525a
Merge pull request #2164 from ZFTurbo/main
Assert messages added
2024-04-30 10:13:38 -07:00
user-miner1 740f4983b3 Assert messages added 2024-04-30 10:10:02 +03:00
Ross Wightman 6de529bb3c
Merge pull request #2162 from huggingface/more_fwd_intermediates
Add forward_intermediates support for xcit, cait, and volo.
2024-04-29 21:09:57 -07:00
Ross Wightman 63970e4e61 Update tests for volo/cait/xcit forward_intermediates 2024-04-29 17:19:11 -07:00
Ross Wightman 9b9a356a04 Add forward_intermediates support for xcit, cait, and volo. 2024-04-29 16:30:45 -07:00
Ross Wightman e741370e2b
Update README.md 2024-04-11 10:16:39 -07:00
Ross Wightman de15b8b828 Next release will be 1.0 :o 2024-04-11 08:55:27 -07:00
Ross Wightman c8da47a773
Update version.py 2024-04-11 08:45:50 -07:00
Ross Wightman d6b95520f1
Merge pull request #2136 from huggingface/vit_features_only
Exploring vit features_only via new forward_intermediates() API, inspired by #2131
2024-04-11 08:38:20 -07:00
Ross Wightman 24f6d4f7f8 Fix #2127 move to ema device 2024-04-10 21:29:09 -07:00
Ross Wightman fe3cf542fa Fix / improve tests for features 2024-04-10 21:14:02 -07:00
Ross Wightman 4b2565e4cb More forward_intermediates() / FeatureGetterNet work
* include relpos vit
* refactor reduction / size calcs so hybrid vits work and dynamic_img_size works
* fix -ve feature indices when pruning
* fix mvitv2 w/ class token
* refine naming
* add tests
2024-04-10 15:11:34 -07:00
Ross Wightman e25bbfceec Fix #2097 a small typo in train.py 2024-04-10 09:40:14 -07:00
Ross Wightman 195d12fdff Add missing device argument to inference.py dataloader 2024-04-10 09:34:34 -07:00
Ross Wightman ef9c6fb846 forward_head(), consistent pre_logits handling to reduce likelihood of people manually replacing .head module having issues 2024-04-09 21:54:59 -07:00
Ross Wightman 679daef76a More forward_intermediates() & features_only work
* forward_intermediates() added to beit, deit, eva, mvitv2, twins, vit, vit_sam
* add features_only to forward intermediates to allow just intermediate features
* fix #2060
* fix #1374
* fix #657
2024-04-09 21:29:16 -07:00
Ross Wightman c28ee2e904
Merge pull request #2145 from huggingface/fix_imagenet22k_ms_mapping
Add teddy-bear class back to first 1000 classes of imagenet22k_ms_synsets (line 851, index 850)
2024-04-09 14:56:31 -07:00
Ross Wightman f5ea076a46
Merge pull request #2143 from huggingface/fix_asymm_set_grad_enable
Fix #2132, remove use of _C.set_grad_enable. Line endings were messed up too
2024-04-09 10:14:13 -07:00
Ross Wightman 9531eb793c
Merge pull request #2142 from huggingface/fix_hrnet_head
Fix #2139, disable strict weight loading when head changes from classification
2024-04-09 10:04:09 -07:00
Ross Wightman 286d941923 Add teddy-bear class back to first 1000 classes of imagenet22k_ms_synsets (index 851) 2024-04-09 09:33:08 -07:00
Ross Wightman 5c5ae8d401 Fix #2132, remove use of _C.set_grad_enable. Line endings were messed up too 2024-04-09 09:00:23 -07:00
Ross Wightman 17b892f703 Fix #2139, disable strict weight loading when head changes from classification 2024-04-09 08:41:37 -07:00
Ross Wightman 5fdc0b4e93 Exploring vit features_only using get_intermediate_layers() as per #2131 2024-04-07 11:24:45 -07:00
Ross Wightman 59b3d86c1d
Merge pull request #2124 from fzyzcjy/patch-1
Fix super tiny type error
2024-04-02 14:31:38 -07:00
fzyzcjy b44e4e45a2 more 2024-04-02 10:25:30 +08:00
fzyzcjy 8880a5cd5c
Update scheduler.py 2024-03-23 11:27:33 +08:00
Ross Wightman 67b0b3d7c7
Merge pull request #2121 from huggingface/cleanup_vit_convert
Improve vit conversions. OpenAI convert pass through main convert
2024-03-21 13:13:53 -07:00
Ross Wightman c559c3911f Improve vit conversions. OpenAI convert pass through main convert for patch & pos resize. Fix #2120 2024-03-21 10:00:43 -07:00
Ross Wightman 492947d129
Merge pull request #2113 from gau-nernst/tinyclip
Add TinyCLIP
2024-03-20 16:22:08 -07:00
Ross Wightman 256cf19148 Rename tinyclip models to fit existing 'clip' variants, use consistently mapped OpenCLIP compatible checkpoint on hf hub 2024-03-20 15:21:46 -07:00
Ross Wightman 111fad1a9f Add first CPU inference benchmark, using torch.compile 2024-03-20 08:43:29 -07:00
Ross Wightman 4c743769ff
Merge pull request #2117 from mwalmsley/patch-1
Update hf_hub.mdx with new import, rename labels
2024-03-19 12:54:07 -07:00
Mike Walmsley 496ba54485
Update hf_hub.mdx with new import, rename labels
Change suggested import from timm.models.hub.push_to_hf_hub to timm.models.push_to_hf_hub

timm.models.hub.push_to_hf_hub import fails because of refactor. timm now uses _hub.py

https://github.com/huggingface/pytorch-image-models/blob/main/timm/models/_hub.py#L270

which is imported into timm.models.__init__

6ccb7d6a7c/timm/models/__init__.py (L87)

Also update model_cfg=dict(labels...) to model_cfg=dict(label_names...) as per deprecation warning, while we're here.

Thank you for all your work creating this, it's a brilliant library!
2024-03-19 13:39:21 -04:00
Thien Tran 1a1d07d479 add other tinyclip 2024-03-19 07:27:09 +08:00
Thien Tran dfffffac55 add tinyclip 8m 2024-03-19 07:02:17 +08:00
Ross Wightman 6ccb7d6a7c
Merge pull request #2111 from jamesljlster/enhance_vit_get_intermediate_layers
Vision Transformer (ViT) get_intermediate_layers: enhanced to support dynamic image size and saved computational costs from unused blocks
2024-03-18 13:41:18 -07:00
Cheng-Ling Lai db06b56d34
Saved computational costs of get_intermediate_layers() from unused blocks 2024-03-17 21:34:06 +08:00