class_docstr: An hard label attack on classification models which attempts to maximize
  the semantic similarity of the label such that the target is outside of the
  decision boundary.
  
  Args:
      target_max_score (float): If set, goal is to reduce model output to
          below this score. Otherwise, goal is to change the overall predicted
          class.
class_docstr_tok: ["An","hard","label","attack","on","classification","models","which","attempts","to","maximize","the","semantic","similarity","of","the","label","such","that","the","target","is","outside","of","the","decision","boundary",".","Args",":","target_max_score","(","float",")",":","If","set",",","goal","is","to","reduce","model","output","to","below","this","score",".","Otherwise",",","goal","is","to","change","the","overall","predicted","class","."]
code: def _get_score(self, model_output, _):
      # If the model outputs a single number and the ground truth output is
      # a float, we assume that this is a regression task.
      if (model_output.numel() == 1) and isinstance(
          self.ground_truth_output, float
      ):
          return max(model_output.item(), self.ground_truth_output)
      else:
          return 1 - model_output[self.ground_truth_output]
  
imports: from .classification_goal_function import ClassificationGoalFunction
label_desc: Use image node_id 3 for calling the HardLabelClassification obj's underlying member method code with example usage: obj._get_score(model_output, _) and returns: max, unknown