def forward(
            self,
            input_ids=None,
            attention_mask=None,
            token_type_ids=None,
            position_ids=None,
            head_mask=None,
            inputs_embeds=None,
            labels=None,
            output_attentions=None,
            output_hidden_states=None,
            return_dict=None,

            xpath_tags_seq=None,
            xpath_subs_seq=None,
    ):
        r"""
        labels (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`, `optional`):
            Labels for computing the token classification loss. Indices should be in ``[-100, 0, ...,
            config.node_type_size]`` (see ``input_ids`` docstring) Tokens with indices set to ``-100`` are ignored
            (masked), the loss is only computed for the tokens with labels in ``[0, ..., config.node_type_size]``
        Returns:

        Examples:
            No example now !

        """
        return_dict = return_dict if return_dict is not None else self.config.use_return_dict

        outputs = self.markuplm(
            input_ids,
            xpath_tags_seq=xpath_tags_seq,
            xpath_subs_seq=xpath_subs_seq,
            attention_mask=attention_mask,
            token_type_ids=token_type_ids,
            position_ids=position_ids,
            head_mask=head_mask,
            inputs_embeds=inputs_embeds,
            output_attentions=output_attentions,
            output_hidden_states=output_hidden_states,
            return_dict=return_dict,
        )

        sequence_output = outputs[0]
        prediction_scores = self.token_cls(sequence_output)  # (bs,seq,node_type_size)
        # pred_node_types = torch.argmax(prediction_scores,dim=2) # (bs,seq)

        token_cls_loss = None
        if labels is not None:
            loss_fct = CrossEntropyLoss()
            token_cls_loss = loss_fct(
                prediction_scores.view(-1, self.config.node_type_size),
                labels.view(-1),
            )

        if not return_dict:
            output = (prediction_scores,) + outputs[2:]
            return ((token_cls_loss,) + output) if token_cls_loss is not None else output

        return TokenClassifierOutput(
            loss=token_cls_loss,
            logits=prediction_scores,  # (bs,seq,node_type_size)
            hidden_states=outputs.hidden_states,
            attentions=outputs.attentions,
        )

        labels (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`, `optional`):
            Labels for computing the token classification loss. Indices should be in ``[-100, 0, ...,
            config.node_type_size]`` (see ``input_ids`` docstring) Tokens with indices set to ``-100`` are ignored
            (masked), the loss is only computed for the tokens with labels in ``[0, ..., config.node_type_size]``
        Returns:

        Examples:
            No example now !

        
markuplm/markuplmft/models/markuplm/modeling_markuplm.py