Preprocesses a tensor encoding a batch of images.
imagenet_preprocess_input(x, data_format = NULL, mode = "caffe")
input tensor, 4D
Data format of the image tensor
One of "caffe", "tf"
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.
Preprocessed tensor