Preprocesses a tensor or array encoding a batch of images.
imagenet_preprocess_input(x, data_format = NULL, mode = "caffe")
Preprocessed tensor or array.
Input Numpy or symbolic tensor, 3D or 4D.
Data format of the image tensor/array.
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.