Could you check the shapes of block2 and block1 and make sure they are equal in all necessary dimensions?
I’ve implemented a simple UNet a while ago here 8, which could be a good starter code for your model.