MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / ResLayer

Class ResLayer

yolox/models/network_blocks.py:104–119  ·  view source on GitHub ↗

Residual layer with `in_channels` inputs.

Source from the content-addressed store, hash-verified

102
103
104class ResLayer(nn.Module):
105 "Residual layer with `in_channels` inputs."
106
107 def __init__(self, in_channels: int):
108 super().__init__()
109 mid_channels = in_channels // 2
110 self.layer1 = BaseConv(
111 in_channels, mid_channels, ksize=1, stride=1, act="lrelu"
112 )
113 self.layer2 = BaseConv(
114 mid_channels, in_channels, ksize=3, stride=1, act="lrelu"
115 )
116
117 def forward(self, x):
118 out = self.layer2(self.layer1(x))
119 return x + out
120
121
122class SPPBottleneck(nn.Module):

Callers 1

make_group_layerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected