(self, x)
| 107 | self.drop_block = drop_block |
| 108 | |
| 109 | def forward(self, x): |
| 110 | if self.split_input: |
| 111 | x_split = torch.split(x, self.in_channels // self.num_paths, 1) |
| 112 | x_paths = [op(x_split[i]) for i, op in enumerate(self.paths)] |
| 113 | else: |
| 114 | x_paths = [op(x) for op in self.paths] |
| 115 | x = torch.stack(x_paths, dim=1) |
| 116 | x_attn = self.attn(x) |
| 117 | x = x * x_attn |
| 118 | x = torch.sum(x, dim=1) |
| 119 | return x |
nothing calls this directly
no outgoing calls
no test coverage detected