def __init__(self, num_classes=2):
    super(DenseNet_121, self).__init__()
    self.features = torch.nn.Sequential(torch.nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3, bias=False), torch.nn.BatchNorm2d(64), torch.nn.ReLU(inplace=True), torch.nn.MaxPool2d(kernel_size=3, stride=2, padding=1))
    self.dense_block_1_1 = self.dense_block(64)
    self.dense_block_1_2 = self.dense_block(96)
    self.dense_block_1_3 = self.dense_block(128)
    self.dense_block_1_4 = self.dense_block(160)
    self.dense_block_1_5 = self.dense_block(192)
    self.dense_block_1_6 = self.dense_block(224)
    self.transition_block_1 = torch.nn.Sequential(torch.nn.Conv2d(256, 128, kernel_size=1, bias=False), torch.nn.AvgPool2d(kernel_size=2, stride=2))
    self.dense_block_2_1 = self.dense_block(128)
    self.dense_block_2_2 = self.dense_block(160)
    self.dense_block_2_3 = self.dense_block(192)
    self.dense_block_2_4 = self.dense_block(224)
    self.dense_block_2_5 = self.dense_block(256)
    self.dense_block_2_6 = self.dense_block(288)
    self.dense_block_2_7 = self.dense_block(320)
    self.dense_block_2_8 = self.dense_block(352)
    self.dense_block_2_9 = self.dense_block(384)
    self.dense_block_2_10 = self.dense_block(416)
    self.dense_block_2_11 = self.dense_block(448)
    self.dense_block_2_12 = self.dense_block(480)
    self.transition_block_2 = torch.nn.Sequential(torch.nn.Conv2d(512, 256, kernel_size=1, bias=False), torch.nn.AvgPool2d(kernel_size=2, stride=2))
    self.dense_block_3_1 = self.dense_block(256)
    self.dense_block_3_2 = self.dense_block(288)
    self.dense_block_3_3 = self.dense_block(320)
    self.dense_block_3_4 = self.dense_block(352)
    self.dense_block_3_5 = self.dense_block(384)
    self.dense_block_3_6 = self.dense_block(416)
    self.dense_block_3_7 = self.dense_block(448)
    self.dense_block_3_8 = self.dense_block(480)
    self.dense_block_3_9 = self.dense_block(512)
    self.dense_block_3_10 = self.dense_block(544)
    self.dense_block_3_11 = self.dense_block(576)
    self.dense_block_3_12 = self.dense_block(608)
    self.dense_block_3_13 = self.dense_block(640)
    self.dense_block_3_14 = self.dense_block(672)
    self.dense_block_3_15 = self.dense_block(704)
    self.dense_block_3_16 = self.dense_block(736)
    self.dense_block_3_17 = self.dense_block(768)
    self.dense_block_3_18 = self.dense_block(800)
    self.dense_block_3_19 = self.dense_block(832)
    self.dense_block_3_20 = self.dense_block(864)
    self.dense_block_3_21 = self.dense_block(896)
    self.dense_block_3_22 = self.dense_block(928)
    self.dense_block_3_23 = self.dense_block(960)
    self.dense_block_3_24 = self.dense_block(992)
    self.transition_block_3 = torch.nn.Sequential(torch.nn.Conv2d(1024, 512, kernel_size=1, bias=False), torch.nn.AvgPool2d(kernel_size=2, stride=2))
    self.dense_block_4_1 = self.dense_block(512)
    self.dense_block_4_2 = self.dense_block(544)
    self.dense_block_4_3 = self.dense_block(576)
    self.dense_block_4_4 = self.dense_block(608)
    self.dense_block_4_5 = self.dense_block(640)
    self.dense_block_4_6 = self.dense_block(672)
    self.dense_block_4_7 = self.dense_block(704)
    self.dense_block_4_8 = self.dense_block(736)
    self.dense_block_4_9 = self.dense_block(768)
    self.dense_block_4_10 = self.dense_block(800)
    self.dense_block_4_11 = self.dense_block(832)
    self.dense_block_4_12 = self.dense_block(864)
    self.dense_block_4_13 = self.dense_block(896)
    self.dense_block_4_14 = self.dense_block(928)
    self.dense_block_4_15 = self.dense_block(960)
    self.dense_block_4_16 = self.dense_block(992)
    self.avgpool = torch.nn.AdaptiveAvgPool2d(7)
    self.classifier = torch.nn.Sequential(torch.nn.Linear(((1024 * 7) * 7), num_classes))
def __init__(self, num_classes=2):
    super(DenseNet_121, self).__init__()
    self.features = torch.nn.Sequential(torch.nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3, bias=False), torch.nn.BatchNorm2d(64), torch.nn.ReLU(inplace=True), torch.nn.MaxPool2d(kernel_size=3, stride=2, padding=1))
    self.dense_block_1_1 = self.dense_block(64)
    self.dense_block_1_2 = self.dense_block(96)
    self.dense_block_1_3 = self.dense_block(128)
    self.dense_block_1_4 = self.dense_block(160)
    self.dense_block_1_5 = self.dense_block(192)
    self.dense_block_1_6 = self.dense_block(224)
    self.transition_block_1 = torch.nn.Sequential(torch.nn.Conv2d(256, 128, kernel_size=1, bias=False), torch.nn.AvgPool2d(kernel_size=2, stride=2))
    self.dense_block_2_1 = self.dense_block(128)
    self.dense_block_2_2 = self.dense_block(160)
    self.dense_block_2_3 = self.dense_block(192)
    self.dense_block_2_4 = self.dense_block(224)
    self.dense_block_2_5 = self.dense_block(256)
    self.dense_block_2_6 = self.dense_block(288)
    self.dense_block_2_7 = self.dense_block(320)
    self.dense_block_2_8 = self.dense_block(352)
    self.dense_block_2_9 = self.dense_block(384)
    self.dense_block_2_10 = self.dense_block(416)
    self.dense_block_2_11 = self.dense_block(448)
    self.dense_block_2_12 = self.dense_block(480)
    self.transition_block_2 = torch.nn.Sequential(torch.nn.Conv2d(512, 256, kernel_size=1, bias=False), torch.nn.AvgPool2d(kernel_size=2, stride=2))
    self.dense_block_3_1 = self.dense_block(256)
    self.dense_block_3_2 = self.dense_block(288)
    self.dense_block_3_3 = self.dense_block(320)
    self.dense_block_3_4 = self.dense_block(352)
    self.dense_block_3_5 = self.dense_block(384)
    self.dense_block_3_6 = self.dense_block(416)
    self.dense_block_3_7 = self.dense_block(448)
    self.dense_block_3_8 = self.dense_block(480)
    self.dense_block_3_9 = self.dense_block(512)
    self.dense_block_3_10 = self.dense_block(544)
    self.dense_block_3_11 = self.dense_block(576)
    self.dense_block_3_12 = self.dense_block(608)
    self.dense_block_3_13 = self.dense_block(640)
    self.dense_block_3_14 = self.dense_block(672)
    self.dense_block_3_15 = self.dense_block(704)
    self.dense_block_3_16 = self.dense_block(736)
    self.dense_block_3_17 = self.dense_block(768)
    self.dense_block_3_18 = self.dense_block(800)
    self.dense_block_3_19 = self.dense_block(832)
    self.dense_block_3_20 = self.dense_block(864)
    self.dense_block_3_21 = self.dense_block(896)
    self.dense_block_3_22 = self.dense_block(928)
    self.dense_block_3_23 = self.dense_block(960)
    self.dense_block_3_24 = self.dense_block(992)
    self.transition_block_3 = torch.nn.Sequential(torch.nn.Conv2d(1024, 512, kernel_size=1, bias=False), torch.nn.AvgPool2d(kernel_size=2, stride=2))
    self.dense_block_4_1 = self.dense_block(512)
    self.dense_block_4_2 = self.dense_block(544)
    self.dense_block_4_3 = self.dense_block(576)
    self.dense_block_4_4 = self.dense_block(608)
    self.dense_block_4_5 = self.dense_block(640)
    self.dense_block_4_6 = self.dense_block(672)
    self.dense_block_4_7 = self.dense_block(704)
    self.dense_block_4_8 = self.dense_block(736)
    self.dense_block_4_9 = self.dense_block(768)
    self.dense_block_4_10 = self.dense_block(800)
    self.dense_block_4_11 = self.dense_block(832)
    self.dense_block_4_12 = self.dense_block(864)
    self.dense_block_4_13 = self.dense_block(896)
    self.dense_block_4_14 = self.dense_block(928)
    self.dense_block_4_15 = self.dense_block(960)
    self.dense_block_4_16 = self.dense_block(992)
    self.avgpool = torch.nn.AdaptiveAvgPool2d(7)
    self.classifier = torch.nn.Sequential(torch.nn.Linear(((1024 * 7) * 7), num_classes))