MCPcopy Create free account
hub / github.com/Vegetebird/GraphMLP / forward

Method forward

demo/lib/hrnet/lib/models/pose_hrnet.py:247–265  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

245 return self.num_inchannels
246
247 def forward(self, x):
248 if self.num_branches == 1:
249 return [self.branches[0](x[0])]
250
251 for i in range(self.num_branches):
252 x[i] = self.branches[i](x[i])
253
254 x_fuse = []
255
256 for i in range(len(self.fuse_layers)):
257 y = x[0] if i == 0 else self.fuse_layers[i][0](x[0])
258 for j in range(1, self.num_branches):
259 if i == j:
260 y = y + x[j]
261 else:
262 y = y + self.fuse_layers[i][j](x[j])
263 x_fuse.append(self.relu(y))
264
265 return x_fuse
266
267
268blocks_dict = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected