preprocess_input

Younghwan Cha·2022년 10월 10일
0

ML

목록 보기
18/18

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

profile
개발 기록

0개의 댓글