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

Function conv1x1

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

1x1 convolution with padding

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

Source from the content-addressed store, hash-verified

134
135
136def conv1x1(in_channels, out_channels, module_name, postfix, stride=1, groups=1, kernel_size=1, padding=0):
137 """1x1 convolution with padding"""
138 return [
139 (
140 f"{module_name}_{postfix}/conv",
141 nn.Conv2d(
142 in_channels,
143 out_channels,
144 kernel_size=kernel_size,
145 stride=stride,
146 padding=padding,
147 groups=groups,
148 bias=False,
149 ),
150 ),
151 (f"{module_name}_{postfix}/norm", nn.BatchNorm2d(out_channels)),
152 (f"{module_name}_{postfix}/relu", nn.ReLU(inplace=True)),
153 ]
154
155
156class Hsigmoid(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected