I would be curious to know wether this fixes it. As the last layer usually returns a [num_batch,1]-dimensional output, the mismatch in dimensions is unfortunately a common trap when using mse_loss. There was a brief discussion with @smth a while ago on twitter to not allow dimension mismatches in mse_loss to avoid this.