MCPcopy Create free account
hub / github.com/SLDGroup/EMCAD / forward

Method forward

lib/decoders.py:280–288  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

278 named_apply(partial(_init_weights, scheme=scheme), self)
279
280 def forward(self, x):
281 avg_pool_out = self.avg_pool(x)
282 avg_out = self.fc2(self.activation(self.fc1(avg_pool_out)))
283
284 max_pool_out= self.max_pool(x)
285 max_out = self.fc2(self.activation(self.fc1(max_pool_out)))
286
287 out = avg_out + max_out
288 return self.sigmoid(out)
289
290# Spatial attention block (SAB)
291class SAB(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected