class_docstr: Transformer word tagging classifier
  Args:
      model_type(str): model family (classifier head), choose between bert/quant_bert/xlnet
      labels (List[str], optional): list of tag labels
class_docstr_tok: ["Transformer","word","tagging","classifier","Args",":","model_type","(","str",")",":","model","family","(","classifier","head",")",",","choose","between","bert\/quant_bert\/xlnet","labels","(","List","[","str","]",",","optional",")",":","list","of","tag","labels"]
docstr: Run evaluation of given logist and truth labels
  
  Args:
      logits: model logits
      label_ids: truth label ids
docstr_tok: ["Run","evaluation","of","given","logist","and","truth","labels","Args",":","logits",":","model","logits","label_ids",":","truth","label","ids"]
code: def evaluate_predictions(self, logits, label_ids):
      """
      Run evaluation of given logist and truth labels
  
      Args:
          logits: model logits
          label_ids: truth label ids
      """
      active_positions = label_ids.view(-1) != 0.0
      active_labels = label_ids.view(-1)[active_positions]
      active_logits = logits.view(-1, len(self.labels_id_map) + 1)[
          active_positions
      ]
      logits = torch.argmax(F.log_softmax(active_logits, dim=1), dim=1)
      logits = logits.detach().cpu().numpy()
      out_label_ids = active_labels.detach().cpu().numpy()
      _, _, f1 = self.extract_labels(
          out_label_ids, self.labels_id_map, logits
      )
      logger.info("Results on evaluation set: F1 = {}".format(f1))
      return f1
  
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 4 for calling the TransformerTokenClassifier obj's underlying member method code with example usage: obj.evaluate_predictions(logits, label_ids) and returns: f1