So confuse about output from transpose convolution in week3

week-3

from input 22 filter 33 stride 2 padding 1
How come the output is 4*4
the formula is output = (input-1)*stride -2padding + kernel + output padding

Please explain

Using the formula,
output = (2-1)*2-2(1)+3+1 = 3+1 = 4

from your answer

output = (2-1)*2-2(1)+3+1
since padding = 1
then why output padding = 1 again?

That formula is commonly used in some contexts but can lead to confusion due to different conventions for handling padding and stride in transpose convolutions. Instead, you can use output = (input - 1)*stride - padding + kernel to calculate the output size for a transpose convolution. Different deep learning frameworks may implement transpose convolutions slightly differently but generally align with this formula.

2 Likes

Here’s a thread from mentor Raymond with some more details on the sizes of the outputs from transpose convolutions.

Here’s a thread which shows some concrete examples of the output sizes and then links to the same thread from Raymond above.

2 Likes