title: How to read Read an RGB image as grayscale image using keras data generator?
body: <p><a href="https://i.stack.imgur.com/iub9P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iub9P.png" alt="enter image description here" /></a><a href="https://i.stack.imgur.com/Xr8VT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xr8VT.png" alt="enter image description here" /></a><strong>strong text</strong>
  I want to read image (1) whose pixel values range is 0-50, using keras generator , but when I set color_mode=‘grayscale’, or even ‘rgb’ it converts all values berween 0 and 1 as shown in figure (2). Which Arguments of ImageDataGenerator or flow_from_directory to be set so that I could get image (1) pixel values range from keras generator ?</p>
  <p>Here is the code I am using</p>
  <pre><code>Data_datagen=ImageDataGenerator(rescale=1./255) #included in our dependencies
  seed=2020
  train_left=Data_datagen.flow_from_directory('train_left/train/',target_size=(384,512), color_mode='grayscale',batch_size=2,shuffle=True,seed=seed)
  
  img=train_left[100][0]
  img=img[0]
  plt.figure()
  plt.imshow(img[:,:,:])
  </code></pre>