it is my model code
class AutoEncoder(nn.Module):
def __init__(self):
    super(AutoEncoder, self).__init__()

    #encoder
    self.conv1 = nn.Conv2d(1, 16, 5, 1, 2)
    self.relu1 = nn.ReLU()
    self.pool1 = nn.MaxPool2d(2, return_indices=True)
    self.conv2 = nn.Conv2d(16, 32, 5, 1, 2)
    self.relu2 = nn.ReLU()
    self.pool2 = nn.MaxPool2d(2, return_indices=True)
    #decoder
    self.unpool1 = nn.MaxUnpool2d(2),
    self.convT1 = nn.ConvTranspose2d(32, 16, 5, 1, 2),
    self.relu3 = nn.ReLU(),
    self.unpool2 = nn.MaxUnpool2d(2),
    self.convT2 = nn.ConvTranspose2d(16, 1, 5, 1, 2),
    self.relu3 = nn.ReLU()



def forward(self, x):
    CONV_1 = self.conv1(x)
    RELU_1 = self.relu1(CONV_1)
    POOL_1, INDICES_1 = self.pool1(RELU_1)
    CONV_2 = self.conv2(POOL_1)
    RELU_2 = self.relu2(CONV_2)
    POOL_2, INDICES_2 = self.pool2(RELU_2)
    encoded = POOL_2
    print(INDICES_1)
    UNPOOL_1 = self.unpool1(POOL_2 , INDICES_1)
    CONVT_1 = self.convT1(UNPOOL_1)
    RELU_3 = self.ReLU(CONVT_1)
    UNPOOL_2 = self.unpool2(RELU_3, INDICES_2)
    CONVT_2 = self.convT2(UNPOOL_2)
    RELU_4 = self.ReLU(CONVT_2)
    decoded = RELU_4

    return encoded, decoded