MCPcopy Create free account
hub / github.com/SooLab/CGFormer / cls_token

Method cls_token

bert/tokenization_utils_base.py:758–763  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected