Skip to content

Commit

Permalink
Clean up unused Silence module (ultralytics#13674)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laughing-q authored Jun 17, 2024
1 parent 6227d8f commit 605e7f4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ultralytics/cfg/models/v9/yolov9e-seg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nc: 80 # number of classes

# gelan backbone
backbone:
- [-1, 1, Silence, []]
- [-1, 1, nn.Identity, []]
- [-1, 1, Conv, [64, 3, 2]] # 1-P1/2
- [-1, 1, Conv, [128, 3, 2]] # 2-P2/4
- [-1, 1, RepNCSPELAN4, [256, 128, 64, 2]] # 3
Expand Down
2 changes: 1 addition & 1 deletion ultralytics/cfg/models/v9/yolov9e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nc: 80 # number of classes

# gelan backbone
backbone:
- [-1, 1, Silence, []]
- [-1, 1, nn.Identity, []]
- [-1, 1, Conv, [64, 3, 2]] # 1-P1/2
- [-1, 1, Conv, [128, 3, 2]] # 2-P2/4
- [-1, 1, RepNCSPELAN4, [256, 128, 64, 2]] # 3
Expand Down
2 changes: 0 additions & 2 deletions ultralytics/nn/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
RepC3,
RepNCSPELAN4,
ResNetLayer,
Silence,
)
from .conv import (
CBAM,
Expand Down Expand Up @@ -134,5 +133,4 @@
"SPPELAN",
"CBFuse",
"CBLinear",
"Silence",
)
1 change: 0 additions & 1 deletion ultralytics/nn/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
ResNetLayer,
RTDETRDecoder,
Segment,
Silence, # noqa (equivalent to nn.Identity, unused in file but required to load YOLOv9 models)
WorldDetect,
)
from ultralytics.utils import DEFAULT_CFG_DICT, DEFAULT_CFG_KEYS, LOGGER, colorstr, emojis, yaml_load
Expand Down

0 comments on commit 605e7f4

Please sign in to comment.