title: How to normalize set of images between (-1,1)
body: <p>i have a dataset on images and i would like to normalize them betwwen (-1,1) before feeding them to NN how can i do that ? </p>
  
  <pre><code>x=sample
  #Normalized Data
  normalized = (x-min(x))/(max(x)-min(x))
  
  # Histogram of example data and normalized data
  par(mfrow=c(1,2))
  hist(x,          breaks=10, xlab="Data",            col="lightblue", main="")
  hist(normalized, breaks=10, xlab="Normalized Data", col="lightblue", main="")
  
  </code></pre>
  
  <p>i found this code online but it did not solve my problem since  i have image dataset</p>