I find that ‘output_padding is provided to resolve this ambiguity by effectively increasing the calculated output shape on one side. Note that output_padding is only used to find output shape, but does not actually add zero-padding to output.’ in the official ducumentsconvtranspose2d 386.
So I think we can use ‘output_padding’ parameters to make output size same.