If the spatial shapes of your output are wrong, I would assume that your model architecture is also wrong or was it working before at one point?
Given your output is smaller than expected, I guess you might need to add more transposed convolutions to the model.