And this is the architecture of the DenseNet model. The source of the error seems to be that there is an AdaptivePooling layer after the selected layer in the Resnet model; however, I’m not sure which layer to select in my DenseNet model. (Denseblock 2 was removed just so that the reply would post)
OrderedDict([('features',
              Sequential(
                (conv0): Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)
                (norm0): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                (relu0): ReLU(inplace=True)
                (pool0): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
                (denseblock1): _DenseBlock(
                  (denselayer1): _DenseLayer(
                    (norm1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(64, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer2): _DenseLayer(
                    (norm1): BatchNorm2d(96, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(96, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer3): _DenseLayer(
                    (norm1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(128, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer4): _DenseLayer(
                    (norm1): BatchNorm2d(160, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(160, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer5): _DenseLayer(
                    (norm1): BatchNorm2d(192, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(192, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer6): _DenseLayer(
                    (norm1): BatchNorm2d(224, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(224, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                )
                (transition1): _Transition(
                  (norm): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (relu): ReLU(inplace=True)
                  (conv): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                  (pool): AvgPool2d(kernel_size=2, stride=2, padding=0)
                )

                < removed denseblock2 >

                (transition2): _Transition(
                  (norm): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (relu): ReLU(inplace=True)
                  (conv): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)
                  (pool): AvgPool2d(kernel_size=2, stride=2, padding=0)
                )
                (denseblock3): _DenseBlock(
                  (denselayer1): _DenseLayer(
                    (norm1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer2): _DenseLayer(
                    (norm1): BatchNorm2d(288, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(288, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer3): _DenseLayer(
                    (norm1): BatchNorm2d(320, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(320, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer4): _DenseLayer(
                    (norm1): BatchNorm2d(352, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(352, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer5): _DenseLayer(
                    (norm1): BatchNorm2d(384, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(384, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer6): _DenseLayer(
                    (norm1): BatchNorm2d(416, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(416, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer7): _DenseLayer(
                    (norm1): BatchNorm2d(448, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(448, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer8): _DenseLayer(
                    (norm1): BatchNorm2d(480, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(480, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer9): _DenseLayer(
                    (norm1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer10): _DenseLayer(
                    (norm1): BatchNorm2d(544, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(544, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer11): _DenseLayer(
                    (norm1): BatchNorm2d(576, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(576, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer12): _DenseLayer(
                    (norm1): BatchNorm2d(608, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(608, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer13): _DenseLayer(
                    (norm1): BatchNorm2d(640, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(640, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer14): _DenseLayer(
                    (norm1): BatchNorm2d(672, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(672, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer15): _DenseLayer(
                    (norm1): BatchNorm2d(704, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(704, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer16): _DenseLayer(
                    (norm1): BatchNorm2d(736, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(736, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer17): _DenseLayer(
                    (norm1): BatchNorm2d(768, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(768, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer18): _DenseLayer(
                    (norm1): BatchNorm2d(800, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(800, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer19): _DenseLayer(
                    (norm1): BatchNorm2d(832, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(832, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer20): _DenseLayer(
                    (norm1): BatchNorm2d(864, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(864, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer21): _DenseLayer(
                    (norm1): BatchNorm2d(896, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(896, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer22): _DenseLayer(
                    (norm1): BatchNorm2d(928, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(928, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer23): _DenseLayer(
                    (norm1): BatchNorm2d(960, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(960, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer24): _DenseLayer(
                    (norm1): BatchNorm2d(992, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(992, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                )
                (transition3): _Transition(
                  (norm): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                  (relu): ReLU(inplace=True)
                  (conv): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
                  (pool): AvgPool2d(kernel_size=2, stride=2, padding=0)
                )
                (denseblock4): _DenseBlock(
                  (denselayer1): _DenseLayer(
                    (norm1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer2): _DenseLayer(
                    (norm1): BatchNorm2d(544, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(544, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer3): _DenseLayer(
                    (norm1): BatchNorm2d(576, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(576, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer4): _DenseLayer(
                    (norm1): BatchNorm2d(608, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(608, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer5): _DenseLayer(
                    (norm1): BatchNorm2d(640, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(640, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer6): _DenseLayer(
                    (norm1): BatchNorm2d(672, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(672, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer7): _DenseLayer(
                    (norm1): BatchNorm2d(704, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(704, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer8): _DenseLayer(
                    (norm1): BatchNorm2d(736, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(736, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer9): _DenseLayer(
                    (norm1): BatchNorm2d(768, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(768, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer10): _DenseLayer(
                    (norm1): BatchNorm2d(800, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(800, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer11): _DenseLayer(
                    (norm1): BatchNorm2d(832, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(832, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer12): _DenseLayer(
                    (norm1): BatchNorm2d(864, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(864, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer13): _DenseLayer(
                    (norm1): BatchNorm2d(896, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(896, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer14): _DenseLayer(
                    (norm1): BatchNorm2d(928, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(928, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer15): _DenseLayer(
                    (norm1): BatchNorm2d(960, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(960, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                  (denselayer16): _DenseLayer(
                    (norm1): BatchNorm2d(992, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu1): ReLU(inplace=True)
                    (conv1): Conv2d(992, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
                    (norm2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
                    (relu2): ReLU(inplace=True)
                    (conv2): Conv2d(128, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
                  )
                )
                (norm5): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              )),
             ('last_linear',
              Sequential(
                (0): Linear(in_features=1024, out_features=3, bias=True)
              ))])