class_docstr: XLNet token classification head with linear classifier.
  This head's forward ignores word piece tokens in its linear layer.
  
  The forward requires an additional 'valid_ids' map that maps the tensors
  for valid tokens (e.g., ignores additional word piece tokens generated by
  the tokenizer, as in NER task the 'X' label).
code: def __init__(self, config):
      super(XLNetTokenClassificationHead, self).__init__(config)
      self.num_labels = config.num_labels
  
      self.transformer = XLNetModel(config)
      self.logits_proj = torch.nn.Linear(
          config.d_model, config.num_labels
      )
      self.dropout = torch.nn.Dropout(config.dropout)
  
      self.apply(self.init_weights)
  
imports: import logging
  from typing import List, Union
  import torch
  from torch.nn import CrossEntropyLoss, Dropout, Linear
  from torch.nn import functional
  from torch.utils.data import DataLoader, SequentialSampler, TensorDataset
  from transformers import ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP, BertForTokenClassification, BertPreTrainedModel, RobertaConfig, RobertaModel, XLNetModel, XLNetPreTrainedModel
  from nlp_architect.data.sequential_tagging import TokenClsInputExample
  from nlp_architect.models.transformers.base_model import InputFeatures, TransformerBase
  from nlp_architect.models.transformers.quantized_bert import QuantizedBertForTokenClassification
  from nlp_architect.utils.metrics import tagging
label_desc: Use image node_id 1 to create a new XLNetTokenClassificationHead object from inherited base classes: XLNetPreTrainedModel with example: obj = XLNetTokenClassificationHead(config)