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

Function conv3x3

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

3x3 convolution with padding

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

Source from the content-addressed store, hash-verified

114
115
116def conv3x3(in_channels, out_channels, module_name, postfix, stride=1, groups=1, kernel_size=3, padding=1):
117 """3x3 convolution with padding"""
118 return [
119 (
120 f"{module_name}_{postfix}/conv",
121 nn.Conv2d(
122 in_channels,
123 out_channels,
124 kernel_size=kernel_size,
125 stride=stride,
126 padding=padding,
127 groups=groups,
128 bias=False,
129 ),
130 ),
131 (f"{module_name}_{postfix}/norm", nn.BatchNorm2d(out_channels)),
132 (f"{module_name}_{postfix}/relu", nn.ReLU(inplace=True)),
133 ]
134
135
136def conv1x1(in_channels, out_channels, module_name, postfix, stride=1, groups=1, kernel_size=1, padding=0):

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected