

TITLE
Make `CLIPFeatureExtractor` accept batch of images as `torch.Tensor`.

COMMENTS
6

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
# 🚀 Feature request

Make `CLIPFeatureExtractor` (or any FeatureExtractor in general) accept batch of images as `torch.Tensor`.

## Motivation

Currently batch of images as `torch.Tensor` are not treated as a batch, it has to be a `List[torch.Tensor]` but it is not the case when using native Pytorch DataLoader. Can we update this line so that it accepts batches as `torch.Tensor`. Maybe we can check if the tensor has 4 dimension then assume it is a batch?
 https://github.com/huggingface/transformers/blob/75ae287aecf20a37c232a41e25443a3421a8b5e2/src/transformers/models/clip/feature_extraction_clip.py#L136

@patil-suraj @TobiasNorlund