The transposed conv layer just doubles the spatial size without changing the number of channels, so that is why I’m passing in_channels twice. I realize that the naming of my variables is really bad, sorry about that.
I’m basically multiply the number of output channels by a power of 2 for each down conv, i.e. 2*out_channels, 4*out_channels, 8*out_channels.
You might want to change the multiplicative factor, if you want to increase the number of channels. out_channels is passed to the __init__ of the model.