unet with modified loss function to account for 2d shapes