class_docstr: Transformer sequence classifier
  
  Args:
      model_type (str): transformer base model type
      labels (List[str], optional): list of labels. Defaults to None.
      task_type (str, optional): task type (classification/regression). Defaults to
      classification.
      metric_fn ([type], optional): metric to use for evaluation. Defaults to
      simple_accuracy.
class_docstr_tok: ["Transformer","sequence","classifier","Args",":","model_type","(","str",")",":","transformer","base","model","type","labels","(","List","[","str","]",",","optional",")",":","list","of","labels",".","Defaults","to","None",".","task_type","(","str",",","optional",")",":","task","type","(","classification\/regression",")",".","Defaults","to","classification",".","metric_fn","(","[","type","]",",","optional",")",":","metric","to","use","for","evaluation",".","Defaults","to","simple_accuracy","."]
code: def _postprocess_logits(self, logits):
      preds = logits.numpy()
      if self.task_type == "classification":
          preds = np.argmax(preds, axis=1)
      elif self.task_type == "regression":
          preds = np.squeeze(preds)
      return preds
  
file_path: nlp-architect/nlp_architect/models/transformers/sequence_classification.py
imports: import logging
  import os
  from typing import List, Union
  import numpy
  import torch
  from torch.utils.data import DataLoader, SequentialSampler, TensorDataset
  from transformers import BertForSequenceClassification, RobertaForSequenceClassification, XLMForSequenceClassification, XLNetForSequenceClassification
  from nlp_architect.data.sequence_classification import SequenceClsInputExample
  from nlp_architect.models.transformers.base_model import InputFeatures, TransformerBase
  from nlp_architect.models.transformers.quantized_bert import QuantizedBertForSequenceClassification
  from nlp_architect.utils.metrics import accuracy
label_desc: Use image node_id 6 for calling the TransformerSequenceClassifier obj's underlying member method code with example usage: obj._postprocess_logits(logits) and returns: preds