Preprocesses a tensor or Numpy array encoding a batch of images.
stackoverflow 에 잘 정리된 대답이 있길래 가져왔다.
https://stackoverflow.com/questions/47555829/preprocess-input-method-in-keras
When you load a single image, you get the shape of one image, which is
(size1,size2,channels).
In order to create a batch of images, you need an additional dimension:
(samples, size1,size2,channels)
The preprocess_input function is meant to adequate your image to the format the model requires.
https://wikidocs.net/103386
https://www.tensorflow.org/api_docs/python/tf/keras/applications/resnet50/preprocess_input