Debug a shape mismatch in a PyTorch U-Net
A U-Net written in PyTorch fails with a tensor shape mismatch. Find the cause (typically where skip connections are concatenated with upsampled features whose size no longer matches after pooling and convolutions), fix it, and explain how you would make the model work for any input size.
No answer yet. Write the first one; the best answer gets endorsed.
