MCPcopy Create free account
hub / github.com/HYUNJS/SGT / __init__

Method __init__

projects/CenterNet/centernet/deform_conv.py:59–74  ·  view source on GitHub ↗
(self, in_channels, out_channels,
                 kernel_size=3, stride=1, padding=1,
                 dilation=1, deformable_groups=1)

Source from the content-addressed store, hash-verified

57class ModulatedDeformConvWithOff(nn.Module):
58
59 def __init__(self, in_channels, out_channels,
60 kernel_size=3, stride=1, padding=1,
61 dilation=1, deformable_groups=1):
62 super(ModulatedDeformConvWithOff, self).__init__()
63 self.offset_mask_conv = nn.Conv2d(
64 in_channels,
65 deformable_groups * 3 * kernel_size * kernel_size,
66 kernel_size=kernel_size,
67 stride=stride,
68 padding=padding,
69 )
70 self.dcnv2 = ModulatedDeformConv(
71 in_channels, out_channels, kernel_size=kernel_size,
72 stride=stride, padding=padding, dilation=dilation,
73 deformable_groups=deformable_groups,
74 )
75
76 def forward(self, input):
77 x = self.offset_mask_conv(input)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected