55
66from mmseg .models .utils import DAPPM , BasicBlock , Bottleneck , resize
77from 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
0 commit comments