MCPcopy Create free account
hub / github.com/JDAI-CV/FaceX-Zoo / forward

Method forward

backbone/HRNet.py:230–247  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

228 return self.num_inchannels
229
230 def forward(self, x):
231 if self.num_branches == 1:
232 return [self.branches[0](x[0])]
233
234 for i in range(self.num_branches):
235 x[i] = self.branches[i](x[i])
236
237 x_fuse = []
238 for i in range(len(self.fuse_layers)):
239 y = x[0] if i == 0 else self.fuse_layers[i][0](x[0])
240 for j in range(1, self.num_branches):
241 if i == j:
242 y = y + x[j]
243 else:
244 y = y + self.fuse_layers[i][j](x[j])
245 x_fuse.append(self.relu(y))
246
247 return x_fuse
248
249
250blocks_dict = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected