Clean up unused `Silence` module (#13674)

pull/13504/head
Laughing 5 months ago committed by GitHub
parent 6227d8f8a1
commit 605e7f4f52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ultralytics/cfg/models/v9/yolov9e-seg.yaml
  2. 2
      ultralytics/cfg/models/v9/yolov9e.yaml
  3. 2
      ultralytics/nn/modules/__init__.py
  4. 1
      ultralytics/nn/tasks.py

@ -7,7 +7,7 @@ nc: 80 # number of classes
# gelan backbone # gelan backbone
backbone: backbone:
- [-1, 1, Silence, []] - [-1, 1, nn.Identity, []]
- [-1, 1, Conv, [64, 3, 2]] # 1-P1/2 - [-1, 1, Conv, [64, 3, 2]] # 1-P1/2
- [-1, 1, Conv, [128, 3, 2]] # 2-P2/4 - [-1, 1, Conv, [128, 3, 2]] # 2-P2/4
- [-1, 1, RepNCSPELAN4, [256, 128, 64, 2]] # 3 - [-1, 1, RepNCSPELAN4, [256, 128, 64, 2]] # 3

@ -7,7 +7,7 @@ nc: 80 # number of classes
# gelan backbone # gelan backbone
backbone: backbone:
- [-1, 1, Silence, []] - [-1, 1, nn.Identity, []]
- [-1, 1, Conv, [64, 3, 2]] # 1-P1/2 - [-1, 1, Conv, [64, 3, 2]] # 1-P1/2
- [-1, 1, Conv, [128, 3, 2]] # 2-P2/4 - [-1, 1, Conv, [128, 3, 2]] # 2-P2/4
- [-1, 1, RepNCSPELAN4, [256, 128, 64, 2]] # 3 - [-1, 1, RepNCSPELAN4, [256, 128, 64, 2]] # 3

@ -45,7 +45,6 @@ from .block import (
RepC3, RepC3,
RepNCSPELAN4, RepNCSPELAN4,
ResNetLayer, ResNetLayer,
Silence,
) )
from .conv import ( from .conv import (
CBAM, CBAM,
@ -134,5 +133,4 @@ __all__ = (
"SPPELAN", "SPPELAN",
"CBFuse", "CBFuse",
"CBLinear", "CBLinear",
"Silence",
) )

@ -47,7 +47,6 @@ from ultralytics.nn.modules import (
ResNetLayer, ResNetLayer,
RTDETRDecoder, RTDETRDecoder,
Segment, Segment,
Silence, # noqa (equivalent to nn.Identity, unused in file but required to load YOLOv9 models)
WorldDetect, WorldDetect,
) )
from ultralytics.utils import DEFAULT_CFG_DICT, DEFAULT_CFG_KEYS, LOGGER, colorstr, emojis, yaml_load from ultralytics.utils import DEFAULT_CFG_DICT, DEFAULT_CFG_KEYS, LOGGER, colorstr, emojis, yaml_load

Loading…
Cancel
Save