Once again if you have targets of dimension 1 then there is an issue with the data that you are using. UNets are segmentation models which means that the input and output would be 2D data…Add a dimension for batch size and you have 3D tensors