Ejemplo n.º 1
0
 def __init__(self, in_channel=32):
     super(NLFilter3d, self).__init__()
     self.inner_channel = in_channel
     self.conv = BasicConv(in_channel,
                           self.inner_channel,
                           bn=True,
                           relu=False,
                           kernel_size=3,
                           stride=1,
                           padding=1)
     self.conv_refine = BasicConv(in_channel + self.inner_channel,
                                  in_channel,
                                  is_3d=True,
                                  bn=True,
                                  relu=True,
                                  kernel_size=3,
                                  stride=1,
                                  padding=1)
     self.getweights = GetWeights()
     self.nlf = NLFIter()
Ejemplo n.º 2
0
 def __init__(self, in_channel=32):
     super(NLFilter, self).__init__()
     self.inner_channel = in_channel
     self.conv_refine = BasicConv(in_channel + self.inner_channel,
                                  in_channel,
                                  bn=True,
                                  relu=True,
                                  kernel_size=3,
                                  stride=1,
                                  padding=1)
     self.getweights = nn.Sequential(
         BasicConv(in_channel,
                   self.inner_channel,
                   bn=True,
                   l2=False,
                   relu=False,
                   kernel_size=3,
                   stride=1,
                   padding=1), GetWeights())
     #        self.amplify = nn.Conv2d(5, 5, kernel_size=1, stride=1, padding=0, bias=False)
     #        self.softmax = nn.Softmax(dim=1)
     self.nlf = NLFIter()