Solved by Naman-ntc in post #2 
              
              
                Are you sure that all paths are correct?? 
Try catch the error something like 
try:
    img = img.transpose(2, 0, 1)
catch:
    print(path_img)
    

Then manually check the path exists, it should help