def __init__(self): super(RFRNet, self).__init__() self.Pconv1 = PartialConv2d(3, 64, 7, 2, 3, multi_channel=True, bias=False) self.bn1 = nn.BatchNorm2d(64) self.Pconv2 = PartialConv2d(64, 64, 7, 1, 3, multi_channel=True, bias=False) self.bn20 = nn.BatchNorm2d(64) self.Pconv21 = PartialConv2d(64, 64, 7, 1, 3, multi_channel=True, bias=False) self.Pconv22 = PartialConv2d(64, 64, 7, 1, 3, multi_channel=True, bias=False) self.bn2 = nn.BatchNorm2d(64) self.RFRModule = RFRModule() self.Tconv = nn.ConvTranspose2d(64, 64, 4, 2, 1, bias=False) self.bn3 = nn.BatchNorm2d(64) self.tail1 = PartialConv2d(67, 32, 3, 1, 1, multi_channel=True, bias=False) self.tail2 = Bottleneck(32, 8) self.out = nn.Conv2d(64, 3, 3, 1, 1, bias=False)
def __init__(self, in_channels_feature, kernel_s = 3, add_last_edge = True): super(EdgeGenerator, self).__init__() self.p_conv = PartialConv2d(in_channels_feature + 1, 64, kernel_size = kernel_s, stride = 1, padding = kernel_s // 2, multi_channel = True, bias = False) self.edge_resolver = Bottleneck(64, 16) self.out_layer = nn.Conv2d(64, 1, 1, bias = False)