From b26fa3b63870b6160340bfeeb384b8d812dbbd15 Mon Sep 17 00:00:00 2001 From: Nihar Gajare Date: Mon, 23 Apr 2018 08:17:37 +0530 Subject: [PATCH] Sync docstring of preprocess_input with _preprocess_numpy_input and _preprocess_symbolic_input in imagenet_utils.py (#10006) --- keras/applications/imagenet_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keras/applications/imagenet_utils.py b/keras/applications/imagenet_utils.py index ef44690b59a..cfdd109853b 100644 --- a/keras/applications/imagenet_utils.py +++ b/keras/applications/imagenet_utils.py @@ -152,13 +152,16 @@ def preprocess_input(x, data_format=None, mode='caffe'): # Arguments x: Input Numpy or symbolic tensor, 3D or 4D. data_format: Data format of the image tensor/array. - mode: One of "caffe", "tf". + mode: One of "caffe", "tf" or "torch". - caffe: will convert the images from RGB to BGR, then will zero-center each color channel with respect to the ImageNet dataset, without scaling. - tf: will scale pixels between -1 and 1, sample-wise. + - torch: will scale pixels between 0 and 1 and then + will normalize each channel with respect to the + ImageNet dataset. # Returns Preprocessed tensor or Numpy array.