Skip to content

Commit 3432ee1

Browse files
committed
add docstring
1 parent 8566ae6 commit 3432ee1

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

mmseg/models/backbones/ddrnet.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from mmseg.models.utils import DAPPM, BasicBlock, Bottleneck, resize
77
from mmseg.registry import MODELS
8+
from mmseg.utils import OptConfigType
89

910

1011
@MODELS.register_module()
@@ -17,23 +18,27 @@ class DDRNet(BaseModule):
1718
Modified from https://github.com/ydhongHIT/DDRNet.
1819
1920
Args:
20-
in_channels
21-
channels:
22-
ppm_channels
23-
align_corners
24-
norm_cfg
25-
act_cfg
26-
init_cfg
21+
in_channels (int): Number of input image channels. Default: 3.
22+
channels: (int): The base channels of DDRNet. Default: 32.
23+
ppm_channels (int): The channels of PPM module. Default: 128.
24+
align_corners (bool): align_corners argument of F.interpolate.
25+
Default: False.
26+
norm_cfg (dict): Config dict to build norm layer.
27+
Default: dict(type='BN', requires_grad=True).
28+
act_cfg (dict): Config dict for activation layer.
29+
Default: dict(type='ReLU', inplace=True).
30+
init_cfg (dict, optional): Initialization config dict.
31+
Default: None.
2732
"""
2833

2934
def __init__(self,
3035
in_channels: int = 3,
3136
channels: int = 32,
3237
ppm_channels: int = 128,
3338
align_corners: bool = False,
34-
norm_cfg=dict(type='BN', requires_grad=True),
35-
act_cfg=dict(type='ReLU', inplace=True),
36-
init_cfg=None):
39+
norm_cfg: OptConfigType = dict(type='BN', requires_grad=True),
40+
act_cfg: OptConfigType = dict(type='ReLU', inplace=True),
41+
init_cfg: OptConfigType = None):
3742
super().__init__(init_cfg)
3843

3944
self.in_channels = in_channels

mmseg/models/decode_heads/ddr_head.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515
@MODELS.register_module()
1616
class DDRHead(BaseDecodeHead):
17-
"""Decode head forDDRNet.
17+
"""Decode head for DDRNet.
1818
1919
Args:
2020
in_channels (int): Number of input channels.
2121
channels (int): Number of output channels.
2222
num_classes (int): Number of classes.
23-
norm_cfg (dict): Config dict for normalization layer.
23+
norm_cfg (dict, optional): Config dict for normalization layer.
2424
Default: dict(type='BN').
25-
act_cfg (dict): Config dict for activation layer.
25+
act_cfg (dict, optional): Config dict for activation layer.
2626
Default: dict(type='ReLU', inplace=True).
2727
"""
2828

0 commit comments

Comments
 (0)