Thanks, it helped.
However, now I get a message ValueError: expected 4D input (got 3D input)
Does this have to do with the fact that I am downsampling and then upsampling, meaning i have to unsqueeze them again?