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

Method __init__

lib/decoders.py:292–302  ·  view source on GitHub ↗
(self, kernel_size=7)

Source from the content-addressed store, hash-verified

290# Spatial attention block (SAB)
291class SAB(nn.Module):
292 def __init__(self, kernel_size=7):
293 super(SAB, self).__init__()
294
295 assert kernel_size in (3, 7, 11), 'kernel must be 3 or 7 or 11'
296 padding = kernel_size//2
297
298 self.conv = nn.Conv2d(2, 1, kernel_size, padding=padding, bias=False)
299
300 self.sigmoid = nn.Sigmoid()
301
302 self.init_weights('normal')
303
304 def init_weights(self, scheme=''):
305 named_apply(partial(_init_weights, scheme=scheme), self)

Callers

nothing calls this directly

Calls 2

init_weightsMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected