I am able to get convoluted values from RGB Image lets say for each channel. So I have red channel with values: -100,8,96,1056,-632,2,3....

Now what I do is that I normalize this values in range 0-255 because that is range of rgb values basically with code Math.Max(minValue, Math.Min(maxValue, currentValue)).

But I don't understand how relu works in CNN. From my point of view I am alredy doing it in my normalization right? Because ReLu layer is from 0 to x where max value of x is 255.

So my question is where should be applied ReLu in RGB image after convolution? (After convolution and normalization values are alredy in range 0-255)

  • 2
    $\begingroup$ You should not normalize after the convolution. The point of ReLU is to introduce a non-linearity in the computation, not to force the values into a specific range. $\endgroup$
    – noe
    Commented Mar 10, 2023 at 18:54
  • $\begingroup$ @noe but thats tricky becuase rgb is fixed to range 0-255 so when I use higher number then 255 I get error. $\endgroup$ Commented Mar 10, 2023 at 18:57
  • 3
    $\begingroup$ The output of a convolution is not to be interpreted directly as an RGB image, and the output value range does not need to be in [0, 255]. Why do you think it should be? $\endgroup$
    – noe
    Commented Mar 10, 2023 at 19:02

1 Answer 1


You should put ReLU as the activation of the convolution layers. ReLU is not applied to the RGB values, but to the matrix obtained by convolving the image, also called the filter.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.