class_docstr: An implementation for an explainable neural network for natural
  language processing and generating rationales used by that network.
  Based on the paper "Rethinking Cooperative Rationalization: Introspective
  Extraction and Complement Control" by Yu et. al.
code: def _get_loss(
      self,
      pred_logits,
      anti_pred_logits,
      cls_pred_logits,
      label,
      z,
      neg_log_probs,
      baseline,
      mask,
  ):
      reward_tuple = self._get_advantages(
          pred_logits,
          anti_pred_logits,
          cls_pred_logits,
          label,
          z,
          neg_log_probs,
          baseline,
          mask,
      )
      (
          sup_loss,
          advantages,
          rewards,
          consistency_loss,
          continuity_loss,
          sparsity_loss,
      ) = reward_tuple
  
      advantages_expand_ = advantages.unsqueeze(-1).expand_as(
          neg_log_probs
      )
      rl_loss = torch.sum(neg_log_probs * advantages_expand_ * mask)
  
      return (
          sup_loss,
          rl_loss,
          rewards,
          consistency_loss,
          continuity_loss,
          sparsity_loss,
      )
  
imports: import logging
  import os
  import random
  from collections import deque
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from interpret_text.experimental.common.base_text_model import BaseTextModel
  from torch.autograd import Variable
  from tqdm import tqdm
  from interpret_text.experimental.common.utils_introspective_rationale import generate_data
label_desc: Use image node_id 10 for calling the IntrospectiveRationaleModel obj's underlying member method code with example usage: obj._get_loss(pred_logits, anti_pred_logits, cls_pred_logits, label, z, neg_log_probs, baseline, mask) and returns: sup_loss,  rl_loss,  rewards,  consistency_loss,  continuity_loss,  sparsity_loss