(self, x)
| 82 | self.gate = create_act_layer(gate_layer) |
| 83 | |
| 84 | def forward(self, x): |
| 85 | y = x.mean((2, 3)).view(x.shape[0], 1, -1) # view for 1d conv |
| 86 | y = self.conv(y) |
| 87 | if self.conv2 is not None: |
| 88 | y = self.act(y) |
| 89 | y = self.conv2(y) |
| 90 | y = self.gate(y).view(x.shape[0], -1, 1, 1) |
| 91 | return x * y.expand_as(x) |
| 92 | |
| 93 | |
| 94 | EfficientChannelAttn = EcaModule # alias |
nothing calls this directly
no outgoing calls
no test coverage detected