(self, x)
| 734 | self.load_state_dict(state_dict, False) |
| 735 | |
| 736 | def forward(self, x): |
| 737 | x, hw_shape = self.patch_embed(x) |
| 738 | |
| 739 | if self.use_abs_pos_embed: |
| 740 | x = x + self.absolute_pos_embed |
| 741 | x = self.drop_after_pos(x) |
| 742 | |
| 743 | outs = [] |
| 744 | for i, stage in enumerate(self.stages): |
| 745 | x, hw_shape, out, out_hw_shape = stage(x, hw_shape) |
| 746 | if i in self.out_indices: |
| 747 | norm_layer = getattr(self, f'norm{i}') |
| 748 | out = norm_layer(out) |
| 749 | out = out.view(-1, *out_hw_shape, |
| 750 | self.num_features[i]).permute(0, 3, 1, |
| 751 | 2).contiguous() |
| 752 | outs.append(out) |
| 753 | |
| 754 | return outs |
nothing calls this directly
no outgoing calls
no test coverage detected