Ross Wightman
76b0e9931a
Placeholder for new mnv3 model
2024-08-23 10:11:20 -07:00
Ross Wightman
39e92f0c0d
mobilenet_edgetpu can use group_size override, more consistency in arg wrap/sadface w/ extra group_size arg
2024-08-22 11:44:02 -07:00
Ross Wightman
b9f020a509
Allow group_size override for more efficientnet and mobilenetv3 based models
2024-08-21 16:51:38 -07:00
Ross Wightman
cec70b6779
Merge pull request #2225 from huggingface/small_things
...
Small things
2024-07-25 20:29:13 -07:00
Ross Wightman
61df3fde89
Wrong hybrid_medium in12k pool sizes
2024-07-25 15:39:21 -07:00
Ross Wightman
9aa2930760
Add latest mobilenetv4 and baseline updates for mobilenetv1 and efficientnet_b0 weights
2024-07-25 14:20:54 -07:00
Ross Wightman
d2240745d3
Fix issue where feature out_indices out of order after wrapping with FeatureGetterNet due to use of set()
2024-07-22 13:33:30 -07:00
Ross Wightman
800405d941
Add conv_large mobilenetv3 aa/blur model defs
2024-07-08 13:50:05 -07:00
Ross Wightman
b751da692d
Add latest ix (xavier init for mqa) hybrid medium & large weights for MobileNetV4
2024-06-24 13:49:55 -07:00
Ross Wightman
16e082e1c2
Add mobilenetv4 hybrid-large weights
2024-06-17 11:08:31 -07:00
Ross Wightman
a22466852d
Add 2400 epoch mobilenetv4 small weights, almost at paper, rounds to 73.8
2024-06-16 10:51:00 -07:00
Ross Wightman
575978ba55
Add mnv4_conv_large 384x384 weight location
2024-06-13 12:58:04 -07:00
Ross Wightman
e42e453128
Fix mmnv4 conv_large weight link, reorder mnv4 pretrained cfg for proper precedence
2024-06-12 11:16:49 -07:00
Ross Wightman
c63da1405c
Pretrained cfg name mismatch
2024-06-11 21:16:54 -07:00
Ross Wightman
88efca1be2
First set of MobileNetV4 weights trained in timm
2024-06-11 18:53:01 -07:00
Ross Wightman
5ee06760dc
Fix classifier input dim for mnv3 after last changes
2024-06-07 13:53:13 -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
5fa6efa158
Add anti-aliasing support to mobilenetv3 and efficientnet family models. Update MobileNetV4 model defs, resolutions. Fix #599
...
* create_aa helper function centralized for all timm uses (resnet, convbnact helper)
* allow BlurPool w/ pre-defined channels (expand)
* mobilenetv4 UIB block using ConvNormAct layers for improved clarity, esp with AA added
* improve more mobilenetv3 and efficientnet related type annotations
2024-05-27 22:06:22 -07:00
Ross Wightman
4ff7c25766
Pass layer_scale_init_value to Mnv3Features module
2024-05-24 16:44:50 -07:00
Ross Wightman
a12b72b5c4
Fix missing head_norm arg pop for feature model
2024-05-24 15:50:34 -07:00
Ross Wightman
7fe96e7a92
More MobileNet-v4 fixes
...
* missed final norm after post pooling 1x1 PW head conv
* improve repr of model by flipping a few modules to None when not used, nn.Sequential for MultiQueryAttention query/key/value/output
* allow layer scaling to be enabled/disabled at model variant level, conv variants don't use it
2024-05-24 15:09:29 -07:00
Ross Wightman
28d76a97db
Mixed up kernel size for last blocks in mnv4-conv-small
2024-05-24 11:50:42 -07:00
Ross Wightman
0c6a69e7ef
Add comments to MNV4 model defs with block variants
2024-05-23 15:54:05 -07:00
Ross Wightman
cb33956b20
Fix some mistakes in mnv4 model defs
2024-05-23 14:24:32 -07:00
Ross Wightman
cee79dada0
Merge remote-tracking branch 'origin/main' into efficientnet_x
2024-05-23 11:01:39 -07:00
Ross Wightman
6a8bb03330
Initial MobileNetV4 pass
2024-05-23 10:49:18 -07:00
yvonwin
58f2f79b04
Remove a duplicate function in mobilenetv3.py: `_gen_lcnet` is repeated in mobilenetv3.py.Remove the duplicate code.
2024-05-15 17:59:34 +08: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
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
d6da4fb01e
Add forward_intermediates() to efficientnet / mobilenetv3 based models as an exercise.
2024-05-02 14:19:16 -07:00
Ross Wightman
89ec91aece
Add missing hf_hub entry for mobilnetv3_rw
2023-11-23 12:44:59 -08:00
Ross Wightman
dfaab97d20
More consistency in model arg/kwarg merge handling
2023-11-21 09:48:03 -08:00
a-r-r-o-w
d5f1525334
include suggestions from review
...
Co-Authored-By: Ross Wightman <rwightman@gmail.com>
2023-10-30 13:47:54 -07:00
a-r-r-o-w
5f14bdd564
include typing suggestions by @rwightman
2023-10-30 13:47:54 -07:00
a-r-r-o-w
c2fe0a2268
improvement: add typehints and docs to timm/models/mobilenetv3.py
2023-10-30 13:47:54 -07:00
Ross Wightman
47517dbefd
Clean more feature extract issues
...
* EfficientNet/MobileNetV3/HRNetFeatures cls and FX mode support -ve index
* MobileNetV3 allows feature_cfg mode to bypass MobileNetV3Features
2023-06-14 14:46:22 -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
572f05096a
Swin and FocalNet weights on HF hub. Add model deprecation functionality w/ some registry tweaks.
2023-03-18 14:55:09 -07:00
Ross Wightman
acfd85ad68
All swin models support spatial output, add output_fmt to v1/v2 and use ClassifierHead.
...
* update ClassifierHead to allow different input format
* add output format support to patch embed
* fix some flatten issues for a few conv head models
* add Format enum and helpers for tensor format (layout) choices
2023-03-15 23:21:51 -07:00
Ross Wightman
2cfff0581b
Add grad_checkpointing support to features_only, test in EfficientDet.
2023-02-09 17:45:40 -08:00
Ross Wightman
656e1776de
Convert mobilenetv3 to multi-weight, tweak PretrainedCfg metadata
2022-12-16 09:29:13 -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
e11efa872d
Update a bunch of weights with external links to timm release assets. Fixes issue with *aliyuncs.com returning forbidden. Did pickle scan / verify and re-hash. Add TresNet-V2-L weights.
2022-09-13 16:35:26 -07:00
Ross Wightman
1b278136c3
Change models with mean 0,0,0 std 1,1,1 from int to float for consistency as mentioned in #1355
2022-07-21 17:36:15 -07:00
Ross Wightman
0862e6ebae
Fix correctness of some group matching regex (no impact on result), some formatting, missed forward_head for resnet
2022-03-19 14:58:54 -07: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
5f81d4de23
Move DeiT to own file, vit getting crowded. Working towards fixing #1029 , make pooling interface for transformers and mlp closer to convnets. Still working through some details...
2022-01-26 22:53:57 -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
83b40c5a58
Last batch of small model weights (for now). mobilenetv3_small 050/075/100 and updated mnasnet_small with lambc/lamb optimizer.
2022-01-19 10:02:02 -08:00