(self, image, normalize: bool = False)
| 109 | return op |
| 110 | |
| 111 | def encode_image(self, image, normalize: bool = False): |
| 112 | token, _ = self(image) |
| 113 | |
| 114 | if normalize: |
| 115 | token = F.normalize(token, dim=-1) |
| 116 | |
| 117 | return token |
| 118 | |
| 119 | def encode_text(self, text, normalize: bool = False, **kwargs): |
| 120 | try: |