def __init__(self, conv, n_feats, kernel_size, act, res_scale): super(_NLResGroup, self).__init__() modules_body = [] modules_body.append(common.NLResAttModuleDownUpPlus(conv, n_feats, kernel_size, bias=True, bn=False, act=nn.ReLU(True), res_scale=1)) # if we don't use group residual, donot remove the following conv modules_body.append(conv(n_feats, n_feats, kernel_size)) self.body = nn.Sequential(*modules_body)
def __init__(self, conv, n_feats, kernel_size, act, res_scale): super(_NLResGroup, self).__init__() modules_body = [] modules_body.append( common.NLResAttModuleDownUpPlus(conv, n_feats, kernel_size, bias=True, bn=False, act=nn.ReLU(True), res_scale=1)) modules_body.append(conv(n_feats, n_feats, kernel_size)) self.body = nn.Sequential(*modules_body)