Solved by Mona_Jalal in post #2 
              
              
                Fixed by using the following line: 
test_data = data_transforms['test'](transforms.ToPILImage()(test_data))

Using this tutorial: https://pytorch.org/docs/master/torchvision/transforms.html#conversion-transforms