One issue with the code is that you are re-initializing some layers on your forward method.
You would usually initialize all modules in the __init__ method and assign them to internal attributes, as you have done with self.block1 etc.
However, all nn.Conv2d and nn.ConvTranspose2d calls in your forward will use new and randomly initialized modules, which won’t be trained.
I’m not sure, if that’s your use case, but I would guess not.
Initialize these modules in your __init__ and rerun your code.
Also, instead of sigmoid + nn.BCELoss, I would recommend to use raw logits + nn.BCEWithLogitsLoss for more numerical stability.