docstr: Get outputs at all <mask> token
  E.g., project the logits of shape
  (``batch_size``, ``max_seq_length``, ``vocab_size``)
  into logits of shape (if num_mask_token > 1)
  (``batch_size``, ``num_mask_token``, ``vocab_size``)
  or into logits of shape (if ``num_mask_token`` = 1)
  (``batch_size``, ``vocab_size``).
  
  Args:
      outputs (:obj:`paddle.Tensor`): The original outputs (maybe process by verbalizer's
           `gather_outputs` before) etc. of the whole sequence.
      batch (:obj:`Union[Dict, InputFeatures]`): The original batch
  
  Returns:
      :obj:`paddle.Tensor`: The extracted outputs of ``<mask>`` tokens.
docstr_tok: ["Get","outputs","at","all","<","mask",">","token","E.g.",",","project","the","logits","of","shape","(","``","batch_size","``",",","``","max_seq_length","``",",","``","vocab_size","``",")","into","logits","of","shape","(","if","num_mask_token",">","1",")","(","``","batch_size","``",",","``","num_mask_token","``",",","``","vocab_size","``",")","or","into","logits","of","shape","(","if","``","num_mask_token","``","=","1",")","(","``","batch_size","``",",","``","vocab_size","``",")",".","Args",":","outputs","(",":","obj",":","`","paddle.Tensor","`",")",":","The","original","outputs","(","maybe","process","by","verbalizer's","`","gather_outputs","`","before",")","etc",".","of","the","whole","sequence",".","batch","(",":","obj",":","`","Union","[","Dict",",","InputFeatures","]","`",")",":","The","original","batch","Returns",":",":","obj",":","`","paddle.Tensor","`",":","The","extracted","outputs","of","``","<","mask",">","``","tokens","."]
code: def extract_at_mask(self, outputs, batch):
      r"""Get outputs at all <mask> token
      E.g., project the logits of shape
      (``batch_size``, ``max_seq_length``, ``vocab_size``)
      into logits of shape (if num_mask_token > 1)
      (``batch_size``, ``num_mask_token``, ``vocab_size``)
      or into logits of shape (if ``num_mask_token`` = 1)
      (``batch_size``, ``vocab_size``).
  
      Args:
          outputs (:obj:`paddle.Tensor`): The original outputs (maybe process by verbalizer's
               `gather_outputs` before) etc. of the whole sequence.
          batch (:obj:`Union[Dict, InputFeatures]`): The original batch
  
      Returns:
          :obj:`paddle.Tensor`: The extracted outputs of ``<mask>`` tokens.
  
      """
      outputs = outputs[paddle.where(batch["loss_ids"] > 0)]
      if outputs.shape[1] == 1:
          outputs = outputs.reshape(
              [outputs.shape[0], outputs.shape[2]]
          )
      return outputs
  
imports: from typing import *
  from utils import round_list, signature
  import paddle
label_desc: Use image node_id 5 for calling the ErniePromptforClassification obj's underlying member method code with example usage: obj.extract_at_mask(outputs, batch) and returns: outputs