Solved by copperwiring in post #2 
              
              
                I think I solved it. I was missing the first parameter. 
 images = transforms.Normalize(images,(0.5, 0.5, 0.5, 0.5, 0.5), (0.5, 0.5, 0.5,0.5, 0.5))
 masks =  transforms.Normalize(masks, (0.5), (0.5))