MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / forward

Method forward

timm/models/layers/eca.py:136–142  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

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
145CircularEfficientChannelAttn = CecaModule

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected