X-CLIP example error
Author: Bing-su
Pull request: no

### System Info

google colab
python=3.7.14
transformers=4.23.1

### Who can help?

@LysandreJik

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

example at <https://huggingface.co/docs/transformers/main/model_doc/xclip#transformers.XCLIPModel>

```python
from PIL import Image
import requests
from transformers import XCLIPProcessor, XCLIPModel

model = XCLIPModel.from_pretrained("microsoft/xclip-base-patch32")
processor = XCLIPProcessor.from_pretrained("microsoft/xclip-base-patch32")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(
    text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True
)

outputs = model(**inputs)
logits_per_video = outputs.logits_per_video  # this is the video-text similarity score
probs = logits_per_video.softmax(dim=1)  # we can take the softmax to get the label probabilities
```

```python
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-3-bb99bb9a026f>](https://localhost:8080/#) in <module>
     10 
     11 inputs = processor(
---> 12     text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True
     13 )
     14 

3 frames
[/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py](https://localhost:8080/#) in batch_encode_plus(self, batch_text_or_text_pairs, add_special_tokens, padding, truncation, max_length, stride, is_split_into_words, pad_to_multiple_of, return_tensors, return_token_type_ids, return_attention_mask, return_overflowing_tokens, return_special_tokens_mask, return_offsets_mapping, return_length, verbose, **kwargs)
   2776             return_length=return_length,
   2777             verbose=verbose,
-> 2778             **kwargs,
   2779         )
   2780 

TypeError: _batch_encode_plus() got an unexpected keyword argument 'images'
```

-  change `images` -> `videos`

```python
from PIL import Image
import requests
from transformers import XCLIPProcessor, XCLIPModel

model = XCLIPModel.from_pretrained("microsoft/xclip-base-patch32")
processor = XCLIPProcessor.from_pretrained("microsoft/xclip-base-patch32")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

# change images -> videos
inputs = processor(
    text=["a photo of a cat", "a photo of a dog"], videos=image, return_tensors="pt", padding=True
)

outputs = model(**inputs)
logits_per_video = outputs.logits_per_video  # this is the video-text similarity score
probs = logits_per_video.softmax(dim=1)  # we can take the softmax to get the label probabilities
```

```python
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-4-8c627970ac41>](https://localhost:8080/#) in <module>
     11 # change images -> videos
     12 inputs = processor(
---> 13     text=["a photo of a cat", "a photo of a dog"], videos=image, return_tensors="pt", padding=True
     14 )
     15 

1 frames
[/usr/local/lib/python3.7/dist-packages/transformers/models/videomae/feature_extraction_videomae.py](https://localhost:8080/#) in __call__(self, videos, return_tensors, **kwargs)
    147         if not valid_videos:
    148             raise ValueError(
--> 149                 "Videos must of type `List[PIL.Image.Image]`, `List[np.ndarray]`, `List[torch.Tensor]` (single"
    150                 " example), `List[List[PIL.Image.Image]]`, `List[List[np.ndarray]]`, `List[List[torch.Tensor]]` (batch"
    151                 " of examples)."

ValueError: Videos must of type `List[PIL.Image.Image]`, `List[np.ndarray]`, `List[torch.Tensor]` (single example), `List[List[PIL.Image.Image]]`, `List[List[np.ndarray]]`, `List[List[torch.Tensor]]` (batch of examples).
```

- change `videos=image` -> `videos=[image]`

```python
from PIL import Image
import requests
from transformers import XCLIPProcessor, XCLIPModel

model = XCLIPModel.from_pretrained("microsoft/xclip-base-patch32")
processor = XCLIPProcessor.from_pretrained("microsoft/xclip-base-patch32")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

# change videos=image -> videos=[image]
inputs = processor(
    text=["a photo of a cat", "a photo of a dog"], videos=[image], return_tensors="pt", padding=True
)

outputs = model(**inputs)
logits_per_video = outputs.logits_per_video  # this is the video-text similarity score
probs = logits_per_video.softmax(dim=1)  # we can take the softmax to get the label probabilities
```

```python
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
[<ipython-input-5-cbcb07e98104>](https://localhost:8080/#) in <module>
     14 )
     15 
---> 16 outputs = model(**inputs)
     17 logits_per_video = outputs.logits_per_video  # this is the video-text similarity score
     18 probs = logits_per_video.softmax(dim=1)  # we can take the softmax to get the label probabilities

7 frames
[/usr/local/lib/python3.7/dist-packages/transformers/models/x_clip/modeling_x_clip.py](https://localhost:8080/#) in forward(self, hidden_states, attention_mask, causal_attention_mask, output_attentions)
    435         batch_size = batch_time // self.num_frames
    436         msg_token = self.message_fc(hidden_states[:, 0, :])
--> 437         msg_token = msg_token.view(batch_size, self.num_frames, hidden_size)
    438 
    439         msg_token = msg_token + self.drop_path(self.message_attn(self.message_ln(msg_token))[0])

RuntimeError: shape '[0, 8, 768]' is invalid for input of size 768
```

[colab](https://colab.research.google.com/drive/1Qq8qTx1SWsdEE4PC3h6Guta8lrRQjVLk?usp=sharing)


### Expected behavior

run...

Comments: