paddlenlp/transformers/bart/tokenizer.py
def create_token_type_ids_from_sequences(self,
                                             token_ids_0,
                                             token_ids_1=None):
        """
        Create a mask from the two sequences passed to be used in a sequence-pair classification task.
        """
        sep = [self.sep_token_id]
        cls = [self.cls_token_id]

        if token_ids_1 is None:
            return len(cls + token_ids_0 + sep) * [0]
        return len(cls + token_ids_0 + sep + sep + token_ids_1 + sep) * [0]

        Create a mask from the two sequences passed to be used in a sequence-pair classification task.
        
Create a mask from the two sequences passed to be used in a sequence-pair classification task.
Create a mask from the two sequences passed to be used in a sequence - pair classification task .
def create_token_type_ids_from_sequences(self,
                                             token_ids_0,
                                             token_ids_1=None):
        sep = [self.sep_token_id]
        cls = [self.cls_token_id]
        if token_ids_1 is None:
            return len(cls + token_ids_0 + sep) * [0]
        return len(cls + token_ids_0 + sep + sep + token_ids_1 + sep) * [0]
def create_token_type_ids_from_sequences ( self , token_ids_0 , token_ids_1 = None ) : sep = [ self . sep_token_id ] cls = [ self . cls_token_id ] if token_ids_1 is None : return len ( cls + token_ids_0 + sep ) * [ 0 ] return len ( cls + token_ids_0 + sep + sep + token_ids_1 + sep ) * [ 0 ]
Create a mask from the two sequences passed to be used in a sequence-pair classification task.
Create a mask from the two sequences passed to be used in a sequence - pair classification task .
"""
        Create a mask from the two sequences passed to be used in a sequence-pair classification task.
        """
self
token_ids_0
token_ids_1