Solved by ptrblck in post #2 
              
              
                Why do you need to transform it to a Tensor first, then back to a PILImage? 
Won’t it work if you remove the two first transforms?