Hi @BeneFr,
I’m pretty confused, so your input values seem to be of shape [B, 1, H, W] - like expected - and your target of shape [B, 1], which matches with the expected output shape [B, 1] of your model. However your error message states that your input for F.mse_loss() - so your model output - is of shape [2592, 1] and your target is of shape [1, 1]. (Also 2592 / 162 = 16)
Maybe you can print the shape  of x and y before you input them to the model and also your model output y_pred? Do you use MSELoss anywhere else than for your loss and metrics?