Skip to content

Commit

Permalink
fix autobackbone
Browse files Browse the repository at this point in the history
  • Loading branch information
jadechoghari committed Dec 29, 2024
1 parent db724d9 commit 8d37be4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/transformers/models/auto/modeling_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,7 @@
("pvt_v2", "PvtV2Backbone"),
("resnet", "ResNetBackbone"),
("rt_detr_resnet", "RTDetrResNetBackbone"),
("rt_detr_v2_resnet", "RTDetrResNetBackbone"),
("swin", "SwinBackbone"),
("swinv2", "Swinv2Backbone"),
("timm_backbone", "TimmBackbone"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,6 @@ class RtDetrV2Config(PretrainedConfig):
Relative weight of the generalized IoU loss in the object detection loss.
eos_coefficient (`float`, *optional*, defaults to 0.0001):
Relative classification weight of the 'no-object' class in the object detection loss.
decoder_n_levels (`<fill_type>`, *optional*, defaults to 3): <fill_docstring>
decoder_offset_scale (`<fill_type>`, *optional*, defaults to 0.5): <fill_docstring>
Examples:
Expand All @@ -257,7 +255,10 @@ class RtDetrV2Config(PretrainedConfig):
>>> # Accessing the model configuration
>>> configuration = model.config
```"""
```
decoder_n_levels (`int`, *optional*, defaults to 3): The number of feature levels used by the decoder.
decoder_offset_scale (`float`, *optional*, defaults to 0.5): Scaling factor applied to the attention offsets in the decoder.
"""

model_type = "rt_detr_v2"
layer_types = ["basic", "bottleneck"]
Expand Down
4 changes: 4 additions & 0 deletions src/transformers/models/rt_detr_v2/modular_rt_detr_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def __init__(


class RtDetrV2Config(RTDetrConfig):
r"""
decoder_n_levels (`int`, *optional*, defaults to 3): The number of feature levels used by the decoder.
decoder_offset_scale (`float`, *optional*, defaults to 0.5): Scaling factor applied to the attention offsets in the decoder.
"""
model_type = "rt_detr_v2"

def __init__(
Expand Down

0 comments on commit 8d37be4

Please sign in to comment.