Hello everyone,
I am fairly new to deep learning and neural networks and I am currently following the 60 Minute Blitz tutorial
https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-py 10
I want to recreate this by extending the CNN to use an autoencoder
The following is my autoencoder
class Autoencoder(nn.Module):
    def __init__(self):
        super(Autoencoder,self).__init__()
        
        self.encoder = nn.Sequential(
            nn.Conv2d(3, 6, kernel_size=5),
            nn.ReLU(True),
            nn.Conv2d(6,16,kernel_size=5),
            nn.ReLU(True),
            nn.Sigmoid()
        )
        
        self.decoder = nn.Sequential(             
            nn.ConvTranspose2d(16,6,kernel_size=5),
            nn.ReLU(True),
            nn.ConvTranspose2d(6,3,kernel_size=5),
            nn.ReLU(True),
            nn.Sigmoid(),
        )
    
    def forward(self,x):
        x = self.encoder(x)
        x = self.decoder(x)
        return x

However, the part which is computing the accuracy throws the following error
The size of tensor a (32) must match the size of tensor b (16) at non-singleton dimension 2
Any help will be greatly appreciated, thanks in advance