示例#1
0
    def __init__(self):
        super(Dis_Tan, self).__init__()
        self.complex_conv1 = layers.ComplexConv(1,
                                                20, (5, 5), (2, 2),
                                                num_tied_block=1)
        self.complex_conv2 = layers.ComplexConv(20,
                                                20, (5, 5), (2, 2),
                                                num_tied_block=1)

        self.distance1 = layers.DifferenceLayer(20, (2, 2), num_tied_block=1)
        self.distance2 = layers.DifferenceLayer(20, (2, 2), num_tied_block=1)

        self.tangentReLU = layers.tangentRELU()

        self.relu = nn.ReLU()
        self.linear_1 = layers.DistanceTransform(20, (2, 2), num_tied_block=1)
        self.conv_1 = nn.Conv2d(20, 25, (4, 4), (1, 1))
        self.mp_1 = nn.MaxPool2d((2, 2))
        self.conv_2 = nn.Conv2d(25, 30, (5, 5), (3, 3))
        self.bn_1 = nn.BatchNorm2d(25)
        self.bn_2 = nn.BatchNorm2d(30)
        self.mp_2 = nn.MaxPool2d((3, 3))
        self.conv_3 = nn.Conv2d(30, 35, (2, 2), (1, 1))
        self.bn_3 = nn.BatchNorm2d(35)
        self.linear_2 = nn.Linear(35, 20)
        self.linear_4 = nn.Linear(20, 10)
 def __init__(self):
     super(LessLayersDis, self).__init__()
     self.complex_conv1 = layers.ComplexConv(1, 20, (5, 5), (2, 2), num_tied_block=1)
     self.complex_conv2 = nn.Conv2d(20, 30, (5, 5), (2, 2))
     self.complex_conv3 = nn.Conv2d(30, 40, (4, 4), (1, 1))
     self.relu = nn.ReLU()
     self.linear_1 = layers.DistanceTransform(20, (2, 2), num_tied_block=1)
     self.distance1 = layers.DifferenceLayerUpsample(20, (2, 2), num_tied_block=1)
     
     
     self.tangentReLU = layers.tangentRELU()
     self.mp_1 = nn.MaxPool2d((2, 2))
     self.conv_2 = nn.Conv2d(40, 50, (5, 5), (3, 3))
     self.bn_2 = nn.BatchNorm2d(50)
     self.mp_2 = nn.MaxPool2d((3, 3))
     self.conv_3 = nn.Conv2d(50, 60, (2, 2), (1, 1))
     self.bn_3 = nn.BatchNorm2d(60)
     self.linear_2 = nn.Linear(60, 40)
     self.linear_4 = nn.Linear(40, 10)
 def __init__(self):
     super(PreviousDisTan, self).__init__()
     self.complex_conv1 = layers.ComplexConv(1, 20, (5, 5), (2, 2), num_tied_block=1)
     self.complex_conv2 = layers.ComplexConv(20, 20, (5, 5), (2, 2), num_tied_block=1)
     self.distance1 = layers.DifferenceLayerUpsample(20, (2, 2), num_tied_block=1)
     self.distance2 = layers.DifferenceLayerUpsample(20, (2, 2), num_tied_block=1)
     
     
     self.tangentReLU = layers.tangentRELU()
     self.proj2 = layers.manifoldReLUv2angle(20) 
     self.relu = nn.ReLU()
     self.linear_1 = layers.DistanceTransformUpsample(20, (22, 22), num_tied_block=1)
     self.conv_1 = nn.Conv2d(20, 30, (5, 5), (1, 1))
     self.mp_1 = nn.MaxPool2d((2, 2))
     self.conv_2 = nn.Conv2d(30, 40, (5, 5), (3, 3))
     self.bn_1 = nn.BatchNorm2d(30)
     self.bn_2 = nn.BatchNorm2d(40)
     self.mp_2 = nn.MaxPool2d((3, 3))
     self.conv_3 = nn.Conv2d(40, 50, (2, 2), (1, 1))
     self.bn_3 = nn.BatchNorm2d(50)
     self.linear_2 = nn.Linear(50, 30)
     self.linear_4 = nn.Linear(30, 10)