(self, x)
| 134 | self.gate = create_act_layer(gate_layer) |
| 135 | |
| 136 | def forward(self, x): |
| 137 | y = x.mean((2, 3)).view(x.shape[0], 1, -1) |
| 138 | # Manually implement circular padding, F.pad does not seemed to be bugged |
| 139 | y = F.pad(y, (self.padding, self.padding), mode='circular') |
| 140 | y = self.conv(y) |
| 141 | y = self.gate(y).view(x.shape[0], -1, 1, 1) |
| 142 | return x * y.expand_as(x) |
| 143 | |
| 144 | |
| 145 | CircularEfficientChannelAttn = CecaModule |
nothing calls this directly
no outgoing calls
no test coverage detected