(self, text, normalize: bool = False)
| 181 | return self._wrap_output(summary, features) |
| 182 | |
| 183 | def encode_text(self, text, normalize: bool = False): |
| 184 | output = self.inner.text_model(**text, return_dict=True) |
| 185 | token = output.pooler_output |
| 186 | |
| 187 | if normalize: |
| 188 | token = F.normalize(token, dim=-1) |
| 189 | |
| 190 | return token |
| 191 | |
| 192 | def zero_shot_postproc(self, logits: torch.Tensor): |
| 193 | logit_scale, logit_bias = self.inner.logit_scale.to(logits.device), self.inner.logit_bias.to(logits.device) |
nothing calls this directly
no outgoing calls
no test coverage detected