[Backbone] Use load_backbone instead of AutoBackbone.from_config (#28661)

* Enable instantiating model with pretrained backbone weights

* Remove doc updates until changes made in modeling code

* Use load_backbone instead

* Add use_timm_backbone to the model configs

* Add missing imports and arguments

* Update docstrings

* Make sure test is properly configured

* Include recent DPT updates
This commit is contained in:
amyeroberts
2024-01-30 16:54:09 +00:00
committed by GitHub
parent c24c52454a
commit 2fa1c808ae
24 changed files with 89 additions and 44 deletions

View File

@@ -443,6 +443,7 @@ class ConditionalDetrModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline
# let's pick a random timm backbone
config.backbone = "tf_mobilenetv3_small_075"
config.use_timm_backbone = True
for model_class in self.all_model_classes:
model = model_class(config)