def __init__(self): super(ManifoldNetComplex, self).__init__() self.complex_conv1 = layers.ComplexConv(1, 20, (5, 1), (2, 1), num_tied_block=1) self.proj1 = layers.manifoldReLUv2angle(20) self.proj2 = layers.manifoldReLUv2angle(20) self.complex_conv2 = layers.ComplexConv(20, 20, (5, 1), (2, 1), num_tied_block=1) self.relu = nn.ReLU() self.dropout = nn.Dropout(0.5) self.linear_1 = layers.DistanceTransform(20, (2, 1), num_tied_block=1) self.conv_1 = nn.Conv2d(20, 40, (6, 1)) self.mp_1 = nn.MaxPool2d((2, 1)) self.conv_2 = nn.Conv2d(40, 60, (4, 1)) self.mp_2 = nn.MaxPool2d((2, 1)) self.conv_3 = nn.Conv2d(60, 80, (4, 1)) self.bn_1 = nn.BatchNorm2d(40) self.bn_2 = nn.BatchNorm2d(60) self.bn_3 = nn.BatchNorm2d(80) self.linear_2 = nn.Linear(80, 40) self.linear_3 = nn.Linear(40, 11) self.name = "Complex"
def __init__(self): super(MoreLayers, 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.complex_conv3 = layers.ComplexConv(20, 20, (4, 4), (1, 1), num_tied_block=1) self.proj2 = layers.manifoldReLUv2angle(20) self.relu = nn.ReLU() self.linear_1 = layers.DistanceTransform(20, (2, 2), num_tied_block=1) self.mp_1 = nn.MaxPool2d((2, 2)) self.conv_2 = nn.Conv2d(20, 30, (5, 5), (3, 3)) self.bn_2 = nn.BatchNorm2d(30) self.mp_2 = nn.MaxPool2d((3, 3)) self.conv_3 = nn.Conv2d(30, 40, (2, 2), (1, 1)) self.bn_3 = nn.BatchNorm2d(40) self.linear_2 = nn.Linear(40, 20) self.linear_4 = nn.Linear(20, 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)