Obtaining text embeddings from CLIP
I am trying to obtain text embeddings from CLIP as shown below. However, I am confused about the difference between text_embeds vs. pooler_output, since they output different things. According to the documentation, text_embeds is "the text embeddings obtained by applying the projection layer to the pooler_output", but I am not sure what this means? Are both acceptable to use as text embeddings (if I want to compare text similarity), or is one more correct than the other?

```
from transformers import CLIPProcessor, CLIPModel
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

model = CLIPModel.from_pretrained("openai/clip-vit-large-patch14")
processor = CLIPProcessor.from_pretrained("openai/clip-vit-large-patch14")

inputs = processor(text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True)
outputs = model(**inputs)
text_embeds = outputs['text_embeds']
pooler_output = outputs['text_model_output']['pooler_output']
```
Hi,

You can use both as text embeddings.

The former (`text_embeds`) are embeddings which are in the same embedding space as the image embeddings (so it allows you to compare images and text - which is what people mainly use CLIP for). However if you just want text embeddings, and don't care about image embeddings, then you can use the `pooler_output`.

<|||||>Also, please ask such questions on our [forum](https://discuss.huggingface.co/) - we'd like to keep Github issues for bugs/feature requests.

Thanks!<|||||>Will do, apologies! Wasn't sure which was the appropriate place. 