Classification token (string). E.g. to extract a summary of an input sequence leveraging self-attention along the full depth of the model. Log an error if used while not having been set.
(self)
| 756 | |
| 757 | @property |
| 758 | def cls_token(self): |
| 759 | """ Classification token (string). E.g. to extract a summary of an input sequence leveraging self-attention along the full depth of the model. Log an error if used while not having been set. """ |
| 760 | if self._cls_token is None and self.verbose: |
| 761 | logger.error("Using cls_token, but it is not set yet.") |
| 762 | return None |
| 763 | return str(self._cls_token) |
| 764 | |
| 765 | @property |
| 766 | def mask_token(self): |
nothing calls this directly
no outgoing calls
no test coverage detected