<p>So, I'm using a pretrained <a href="https://github.com/Cadene/pretrained-models.pytorch/blob/master/pretrainedmodels/models/pnasnet.py" rel="nofollow noreferrer">PNASNet-5-Large model</a> to do some image classification.</p>
<p>In the file, it says that the input range is in [0,1] (I'm assuming pixel values of input images). The images I have are already in this range.
The channel means and standard deviation for RGB channels are stated as [0.5, 0.5, 0.5], [0.5, 0.5, 0.5] respectively.
Now when I use the <a href="https://pytorch.org/vision/stable/transforms.html#torchvision.transforms.Normalize" rel="nofollow noreferrer">torchvision.transforms.Normalize</a> to normalize the images using the stated means and standard deviations, the pixel values get to the range [-1,1].</p>
<p>The code I wrote for normalization:</p>
<pre><code>transforms.Normalize([0.5, 0.5, 0.5],[0.5, 0.5, 0.5])
</code></pre>
<p>I believe I'm missing something fundamental. Should I normalize the images or should I not? Thanks!</p>

<convolutional-neural-networks><classification>
Relationship between input range and channel means, standard deviations for CNNs
john wayne
# Relationship between input range and channel means, standard deviations for CNNs

(Asked by: username_0 on 2018-12-19)

So, I'm using a pretrained PNASNet-5-Large model to do some image classification.
In the file, it says that the input range is in [0,1] (I'm assuming pixel values of input images). The images I have are already in this range.
The channel means and standard deviation for RGB channels are stated as [0.5, 0.5, 0.5], [0.5, 0.5, 0.5] respectively.
Now when I use the torchvision.transforms.Normalize to normalize the images using the stated means and standard deviations, the pixel values get to the range [-1,1].
The code I wrote for normalization:
transforms.Normalize([0.5, 0.5, 0.5],[0.5, 0.5, 0.5])

I believe I'm missing something fundamental. Should I normalize the images or should I not? Thanks!

**Tags:** convolutional-neural-networks, classification


---

## 0 answers

