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.
docstr: Get softmaxed rationale importances.
  
  :param df_test: dataframe containing test data labels, tokens, masks,
      and counts
  :type df_test: pd.DataFrame
  :return:
      z_scores: softmaxed rationale scores with dimension
          (batch_size, length)
  :rtype: torch.FloatTensor
docstr_tok: ["Get","softmaxed","rationale","importances",".",":","param","df_test",":","dataframe","containing","test","data","labels",",","tokens",",","masks",",","and","counts",":","type","df_test",":","pd.DataFrame",":","return",":","z_scores",":","softmaxed","rationale","scores","with","dimension","(","batch_size",",","length",")",":","rtype",":","torch.FloatTensor"]
code: def get_z_scores(self, df_test):
      """Get softmaxed rationale importances.
  
      :param df_test: dataframe containing test data labels, tokens, masks,
          and counts
      :type df_test: pd.DataFrame
      :return:
          z_scores: softmaxed rationale scores with dimension
              (batch_size, length)
      :rtype: torch.FloatTensor
      """
      batch_dict = generate_data(df_test, self.use_cuda)
      x_tokens = batch_dict["x"]
      mask = batch_dict["m"]
      z_scores, _, _ = self.generator(x_tokens, mask)
      z_scores = F.softmax(z_scores, dim=-1)
  
      return z_scores
  
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 8 for calling the IntrospectiveRationaleModel obj's underlying member method code with example usage: obj.get_z_scores(df_test) and returns: z_scores