Commit Graph

13 Commits (225f4f92b3738322dfe67f67aa5af47d36c91c37)

Author SHA1 Message Date
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 c838c4233f Add typing to reset_classifier() on other models 2024-05-12 11:12:00 -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 850ab4931f Missed a few pretrained tags... 2023-05-10 12:16:30 -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 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 7d9e321b76 Improve tracing of window attn models with simpler reshape logic 2023-02-17 07:59:06 -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 f489f02ad1 Make gcvit window size ratio based to improve resolution changing support #1449. Change default init to original. 2022-09-06 16:14:00 -07:00
Ross Wightman 8c9696c9df More model and test fixes 2022-08-22 17:40:31 -07:00
Ross Wightman ca52108c2b Fix some model support functions 2022-08-19 10:20:51 -07:00
Ross Wightman f332fc2db7 Fix some test failures, torchscript issues 2022-08-18 16:19:46 -07:00
Ross Wightman c486aa71f8 Add GCViT 2022-08-17 14:29:18 -07:00