MCPcopy Create free account
hub / github.com/OpenDriveLab/OccNet / dw_conv3x3

Function dw_conv3x3

projects/mmdet3d_plugin/models/backbones/vovnet.py:92–113  ·  view source on GitHub ↗

3x3 convolution with padding

(in_channels, out_channels, module_name, postfix, stride=1, kernel_size=3, padding=1)

Source from the content-addressed store, hash-verified

90
91
92def dw_conv3x3(in_channels, out_channels, module_name, postfix, stride=1, kernel_size=3, padding=1):
93 """3x3 convolution with padding"""
94 return [
95 (
96 '{}_{}/dw_conv3x3'.format(module_name, postfix),
97 nn.Conv2d(
98 in_channels,
99 out_channels,
100 kernel_size=kernel_size,
101 stride=stride,
102 padding=padding,
103 groups=out_channels,
104 bias=False
105 )
106 ),
107 (
108 '{}_{}/pw_conv1x1'.format(module_name, postfix),
109 nn.Conv2d(in_channels, out_channels, kernel_size=1, stride=1, padding=0, groups=1, bias=False)
110 ),
111 ('{}_{}/pw_norm'.format(module_name, postfix), nn.BatchNorm2d(out_channels)),
112 ('{}_{}/pw_relu'.format(module_name, postfix), nn.ReLU(inplace=True)),
113 ]
114
115
116def conv3x3(in_channels, out_channels, module_name, postfix, stride=1, groups=1, kernel_size=3, padding=1):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected