Enable instantiating model with pretrained backbone weights (#28214)
* Enable instantiating model with pretrained backbone weights * Update tests so backbone checkpoint isn't passed in * Remove doc updates until changes made in modeling code * Clarify pretrained import * Update configs - docs and validation check * Update src/transformers/utils/backbone_utils.py Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> * Clarify exception message * Update config init in tests * Add test for when use_timm_backbone=True * Small test updates --------- Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
This commit is contained in:
@@ -114,6 +114,7 @@ class Mask2FormerModelTester:
|
||||
config.backbone_config.hidden_size = 16
|
||||
config.backbone_config.num_channels = self.num_channels
|
||||
config.backbone_config.num_heads = [1, 1, 2, 2]
|
||||
config.backbone = None
|
||||
|
||||
config.hidden_dim = self.hidden_dim
|
||||
config.mask_feature_size = self.hidden_dim
|
||||
|
||||
Reference in New Issue
Block a user