• amyeroberts's avatar
    [`DETR`] Remove timm hardcoded logic in modeling files (#29038) · aafa7ce7
    amyeroberts authored
    
    
    * Enable instantiating model with pretrained backbone weights
    
    * Clarify pretrained import
    
    * Use load_backbone instead
    
    * Add backbone_kwargs to config
    
    * Fix up
    
    * Add tests
    
    * Tidy up
    
    * Enable instantiating model with pretrained backbone weights
    
    * Update tests so backbone checkpoint isn't passed in
    
    * Clarify pretrained import
    
    * Update configs - docs and validation check
    
    * Update src/transformers/utils/backbone_utils.py
    Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
    
    * Clarify exception message
    
    * Update config init in tests
    
    * Add test for when use_timm_backbone=True
    
    * Use load_backbone instead
    
    * Add use_timm_backbone to the model configs
    
    * Add backbone_kwargs to config
    
    * Pass kwargs to constructors
    
    * Draft
    
    * Fix tests
    
    * Add back timm - weight naming
    
    * More tidying up
    
    * Whoops
    
    * Tidy up
    
    * Handle when kwargs are none
    
    * Update tests
    
    * Revert test changes
    
    * Deformable detr test - don't use default
    
    * Don't mutate; correct model attributes
    
    * Add some clarifying comments
    
    * nit - grammar is hard
    
    ---------
    Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
    aafa7ce7
configuration_detr.py 13.7 KB