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

Method forward

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

Source from the content-addressed store, hash-verified

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
94EfficientChannelAttn = EcaModule # alias

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected