Hi @alexeib , I tried to write a demo code using only Unet architecture,  and I assigned random input and output. The out_padding was set to 1.  However, it worked and I got the gradient. Hence, I think it is related to the modules before and after Unet, if that’s the case, then I would probably have to release all my codes   , sorry about that.