def __init__(self): super().__init__() self.conv1 = create_conv(1, 3, 2, 1, -2) self.conv2 = create_conv(1, 3, 2, 2, -2) self.conv3 = create_conv(1, 3, 2, 3, -2) self.relu = nn.ReLU() self.conv4 = create_conv(3, 1, 3, 10, 0) self.conv5 = create_conv(3, 1, 3, -10, 0)
def __init__(self): super().__init__() self.conv1 = create_conv(1, 8, 3, 1, -2, padding=1) self.conv2 = create_conv(8, 8, 3, 2, -2, padding=1) self.conv3 = create_conv(8, 8, 3, 3, -2, padding=1) self.conv4 = create_conv(8, 1, 3, 10, 0, padding=1) self.conv5 = create_conv(8, 1, 3, -10, 0, padding=1) self.linear = nn.Linear(64, 10) self.relu = nn.ReLU()
def __init__(self): super().__init__() self.conv1 = create_conv(1, 16, 2, 0, 1) for i in range(16): self.conv1.weight.data[i] += i self.relu = nn.ReLU() self.conv2 = create_conv(16, 32, 3, 20, 0) for i in range(32): self.conv2.weight.data[i] += i self.bn = nn.BatchNorm2d(32) self.conv3 = create_conv(32, 1, 5, 5, 1)
def __init__(self): super().__init__() # Usual conv self.conv1 = create_conv(1, 3, 2, 9, -2) self.relu = nn.ReLU() # Depthwise conv self.conv2 = nn.Conv2d(3, 3, 1, groups=3) # Downsample conv self.conv3 = create_conv(3, 8, 3, -10, 0, stride=2) # Group conv self.conv4 = nn.Conv2d(8, 4, 1, groups=4)
def __init__(self): super().__init__() self.conv1 = create_conv(1, 16, 2, 1, -2) for i in range(16): self.conv1.weight.data[i] += i self.conv2 = create_conv(16, 32, 2, 2, -2) self.conv3 = create_conv(16, 32, 2, 2, -2) for i in range(32): self.conv2.weight.data[i] += i self.conv3.weight.data[i] += i self.relu = nn.ReLU() self.conv4 = create_conv(32, 16, 3, 10, 0) for i in range(16): self.conv4.weight.data[i] += i
def __init__(self): super().__init__() self.conv1 = create_conv(1, 1, 2, -1, -2) self.fc = nn.Linear(3, 6)
def __init__(self): super().__init__() self.conv1 = create_conv(1, 2, 2, -1, -2) self.conv2 = create_conv(1, 2, 2, -1, -2)
def __init__(self): super().__init__() self.conv1 = create_conv(1, 2, 2, 9, -2) self.conv2 = create_conv(2, 1, 3, -10, 0)
def __init__(self): super().__init__() self.features = [] self.conv1 = create_conv(1, 2, 2, -1, -2) self.conv2 = create_conv(1, 2, 2, -1, -2) self.relu = nn.ReLU()