Nilesh_Pandey:

transforms.normalize()


I guess this has to be normalize.
You can refer to this post:

  
    
    
    Understanding transform.Normalize( ) vision
  
  
    Normalize does the following for each channel: 
image = (image - mean) / std 
The parameters mean, std are passed as 0.5, 0.5 in your case. This will normalize the image in the range [-1,1]. For example, the minimum value 0 will be converted to (0-0.5)/0.5=-1, the maximum value of 1 will be converted to (1-0.5)/0.5=1. 
if you would like to get your image back in [0,1] range,  you could use, 
image = ((image * std) + mean) 
About whether it helps CNN to learn better,  I’m not sure. But majority o…
  


To renormalize the image, you can use transforms.Normalize(mean=[-1,-1,-1],std=[2,2,2]).