(self, x)
| 28 | self.gap = GAP() |
| 29 | |
| 30 | def forward(self, x): |
| 31 | x_3 = self.multi_3(x) |
| 32 | x_5 = self.multi_5(x) |
| 33 | x_7 = self.multi_7(x) |
| 34 | x_3 = F.adaptive_max_pool1d(x_3, self.out_shape) |
| 35 | x_5 = F.adaptive_max_pool1d(x_5, self.out_shape) |
| 36 | x_7 = F.adaptive_max_pool1d(x_7, self.out_shape) |
| 37 | x_concat = torch.cat((x_3, x_5, x_7), 1) |
| 38 | x_concat = self.after_concat(x_concat) |
| 39 | |
| 40 | if self.use_act: |
| 41 | return torch.sigmoid(self.gap(x)) * x_concat |
| 42 | else: |
| 43 | return x_concat |
| 44 | |
| 45 | |
| 46 | class GAP(): |
nothing calls this directly
no outgoing calls
no test coverage detected