def define_module(self): ngf = self.gf_dim self.att = SPATIAL_ATT(ngf, self.ef_dim) # spatial attention self.channel_att = CHANNEL_ATT(ngf, self.ef_dim) # channel-wise attention self.residual = self._make_layer(ResBlock, ngf * 3) self.upsample = upBlock(ngf * 3, ngf) self.SAIN = ACM(ngf * 3)
def define_module(self): ngf = self.gf_dim self.att = SPATIAL_ATT(ngf, self.ef_dim) self.color_channel_att = DCM_CHANNEL_ATT(ngf, self.ef_dim) self.residual = self._make_layer(ResBlock, ngf * 3) self.block = nn.Sequential(conv3x3(ngf * 3, ngf * 2), nn.InstanceNorm2d(ngf * 2), GLU()) self.SAIN = ACM(ngf * 3)