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

Class Inception

yolox/motdt_tracker/reid_model.py:110–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108
109
110class Inception(nn.Module):
111 def __init__(self, in_planes, n1x1, n3x3red, n3x3, n5x5red, n5x5, pool_planes):
112 super(Inception, self).__init__()
113 # 1x1 conv branch
114 self.b1 = nn.Sequential(
115 nn.Conv2d(in_planes, n1x1, kernel_size=1),
116 nn.ReLU(True),
117 )
118
119 # 1x1 conv -> 3x3 conv branch
120 self.b2 = nn.Sequential(
121 nn.Conv2d(in_planes, n3x3red, kernel_size=1),
122 nn.ReLU(True),
123 nn.Conv2d(n3x3red, n3x3, kernel_size=3, padding=1),
124 nn.ReLU(True),
125 )
126
127 # 1x1 conv -> 5x5 conv branch
128 self.b3 = nn.Sequential(
129 nn.Conv2d(in_planes, n5x5red, kernel_size=1),
130 nn.ReLU(True),
131
132 nn.Conv2d(n5x5red, n5x5, kernel_size=5, padding=2),
133 nn.ReLU(True),
134 )
135
136 # 3x3 pool -> 1x1 conv branch
137 self.b4 = nn.Sequential(
138 nn.MaxPool2d(3, stride=1, padding=1),
139
140 nn.Conv2d(in_planes, pool_planes, kernel_size=1),
141 nn.ReLU(True),
142 )
143
144 def forward(self, x):
145 y1 = self.b1(x)
146 y2 = self.b2(x)
147 y3 = self.b3(x)
148 y4 = self.b4(x)
149 return torch.cat([y1,y2,y3,y4], 1)
150
151
152class GoogLeNet(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected