| 753 | assert False, 'Not supported' |
| 754 | |
| 755 | def forward(self, x) -> List[torch.tensor]: |
| 756 | out = [] |
| 757 | x = self.conv1(x) |
| 758 | x = self.bn1(x) |
| 759 | x = self.act1(x) |
| 760 | if 0 in self._out_idx: |
| 761 | out.append(x) |
| 762 | x = self.conv2(x) |
| 763 | x = self.bn2(x) |
| 764 | x = self.act2(x) |
| 765 | x = self.stages(x) |
| 766 | if self.incre_modules is not None: |
| 767 | x = [incre(f) for f, incre in zip(x, self.incre_modules)] |
| 768 | for i, f in enumerate(x): |
| 769 | if i + 1 in self._out_idx: |
| 770 | out.append(f) |
| 771 | return out |
| 772 | |
| 773 | |
| 774 | def _create_hrnet(variant, pretrained, **model_kwargs): |