The size of a transpose convolution is ambiguous, meaning there is not a universally agreed upon formula for the output size. The problem is that on a forward convolution, there can be multiple input sizes that give you the same output size. Here’s a thread from mentor Raymond that explains this in detail.