U-net upsampling block

The important thing to note is that “same” padding only gives you the same sized output when stride = 1. That is true for both normal and transpose convolutions. Here’s a thread about this for normal convolutions. And here’s a great thread from mentor Raymond about how it works with transpose convolutions and why the output size can be ambiguous. Here’s another thread which shows actual examples of the sizes of the outputs with transpose convolutions with different stride values.