MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / forward

Method forward

timm/models/hrnet.py:481–498  ·  view source on GitHub ↗
(self, x: List[torch.Tensor])

Source from the content-addressed store, hash-verified

479 return self.num_inchannels
480
481 def forward(self, x: List[torch.Tensor]):
482 if self.num_branches == 1:
483 return [self.branches[0](x[0])]
484
485 for i, branch in enumerate(self.branches):
486 x[i] = branch(x[i])
487
488 x_fuse = []
489 for i, fuse_outer in enumerate(self.fuse_layers):
490 y = x[0] if i == 0 else fuse_outer[0](x[0])
491 for j in range(1, self.num_branches):
492 if i == j:
493 y = y + x[j]
494 else:
495 y = y + fuse_outer[j](x[j])
496 x_fuse.append(self.fuse_act(y))
497
498 return x_fuse
499
500
501blocks_dict = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected