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

Method __init__

lib/decoders.py:108–131  ·  view source on GitHub ↗
(self, channels=[512,320,128,64])

Source from the content-addressed store, hash-verified

106
107class CASCADE_Cat(nn.Module):
108 def __init__(self, channels=[512,320,128,64]):
109 super(CASCADE_Cat,self).__init__()
110
111 self.Conv_1x1 = nn.Conv2d(channels[0],channels[0],kernel_size=1,stride=1,padding=0)
112 self.ConvBlock4 = conv_block(ch_in=channels[0], ch_out=channels[0])
113
114 self.Up3 = up_conv(ch_in=channels[0],ch_out=channels[1])
115 self.AG3 = Attention_block(F_g=channels[1],F_l=channels[1],F_int=channels[2])
116 self.ConvBlock3 = conv_block(ch_in=2*channels[1], ch_out=channels[1])
117
118 self.Up2 = up_conv(ch_in=channels[1],ch_out=channels[2])
119 self.AG2 = Attention_block(F_g=channels[2],F_l=channels[2],F_int=channels[3])
120 self.ConvBlock2 = conv_block(ch_in=2*channels[2], ch_out=channels[2])
121
122 self.Up1 = up_conv(ch_in=channels[2],ch_out=channels[3])
123 self.AG1 = Attention_block(F_g=channels[3],F_l=channels[3],F_int=int(channels[3]/2))
124 self.ConvBlock1 = conv_block(ch_in=2*channels[3], ch_out=channels[3])
125
126 self.CA4 = ChannelAttention(channels[0])
127 self.CA3 = ChannelAttention(2*channels[1])
128 self.CA2 = ChannelAttention(2*channels[2])
129 self.CA1 = ChannelAttention(2*channels[3])
130
131 self.SA = SpatialAttention()
132
133 def forward(self,x, skips):
134

Callers

nothing calls this directly

Calls 6

conv_blockClass · 0.85
up_convClass · 0.85
Attention_blockClass · 0.85
ChannelAttentionClass · 0.85
SpatialAttentionClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected