class_docstr: Matcher based on highest value.
  
  This class computes matches from a similarity matrix. Each column is matched
  to a single row.
  
  To support object detection target assignment this class enables setting both
  matched_threshold (upper threshold) and unmatched_threshold (lower thresholds)
  defining three categories of similarity which define whether examples are
  positive, negative, or ignored:
  (1) similarity >= matched_threshold: Highest similarity. Matched/Positive!
  (2) matched_threshold > similarity >= unmatched_threshold: Medium similarity.
          Depending on negatives_lower_than_unmatched, this is either
          Unmatched/Negative OR Ignore.
  (3) unmatched_threshold > similarity: Lowest similarity. Depending on flag
          negatives_lower_than_unmatched, either Unmatched/Negative OR Ignore.
  For ignored matches this class sets the values in the Match object to -2.
docstr: Construct ArgMaxMatcher.
  
  Args:
    matched_threshold: Threshold for positive matches. Positive if
      sim >= matched_threshold, where sim is the maximum value of the
      similarity matrix for a given column. Set to None for no threshold.
    unmatched_threshold: Threshold for negative matches. Negative if
      sim < unmatched_threshold. Defaults to matched_threshold
      when set to None.
    negatives_lower_than_unmatched: Boolean which defaults to True. If True
      then negative matches are the ones below the unmatched_threshold,
      whereas ignored matches are in between the matched and unmatched
      threshold. If False, then negative matches are in between the matched
      and unmatched threshold, and everything lower than unmatched is ignored.
    force_match_for_each_row: If True, ensures that each row is matched to
      at least one column (which is not guaranteed otherwise if the
      matched_threshold is high). Defaults to False. See
      argmax_matcher_test.testMatcherForceMatch() for an example.
  
  Raises:
    ValueError: if unmatched_threshold is set but matched_threshold is not set
      or if unmatched_threshold > matched_threshold.
docstr_tok: ["Construct","ArgMaxMatcher",".","Args",":","matched_threshold",":","Threshold","for","positive","matches",".","Positive","if","sim",">","=","matched_threshold",",","where","sim","is","the","maximum","value","of","the","similarity","matrix","for","a","given","column",".","Set","to","None","for","no","threshold",".","unmatched_threshold",":","Threshold","for","negative","matches",".","Negative","if","sim","<","unmatched_threshold",".","Defaults","to","matched_threshold","when","set","to","None",".","negatives_lower_than_unmatched",":","Boolean","which","defaults","to","True",".","If","True","then","negative","matches","are","the","ones","below","the","unmatched_threshold",",","whereas","ignored","matches","are","in","between","the","matched","and","unmatched","threshold",".","If","False",",","then","negative","matches","are","in","between","the","matched","and","unmatched","threshold",",","and","everything","lower","than","unmatched","is","ignored",".","force_match_for_each_row",":","If","True",",","ensures","that","each","row","is","matched","to","at","least","one","column","(","which","is","not","guaranteed","otherwise","if","the","matched_threshold","is","high",")",".","Defaults","to","False",".","See","argmax_matcher_test.testMatcherForceMatch","(",")","for","an","example",".","Raises",":","ValueError",":","if","unmatched_threshold","is","set","but","matched_threshold","is","not","set","or","if","unmatched_threshold",">","matched_threshold","."]
code: def __init__(
      self,
      matched_threshold,
      unmatched_threshold=None,
      negatives_lower_than_unmatched=True,
      force_match_for_each_row=False,
  ):
      """Construct ArgMaxMatcher.
  
      Args:
        matched_threshold: Threshold for positive matches. Positive if
          sim >= matched_threshold, where sim is the maximum value of the
          similarity matrix for a given column. Set to None for no threshold.
        unmatched_threshold: Threshold for negative matches. Negative if
          sim < unmatched_threshold. Defaults to matched_threshold
          when set to None.
        negatives_lower_than_unmatched: Boolean which defaults to True. If True
          then negative matches are the ones below the unmatched_threshold,
          whereas ignored matches are in between the matched and unmatched
          threshold. If False, then negative matches are in between the matched
          and unmatched threshold, and everything lower than unmatched is ignored.
        force_match_for_each_row: If True, ensures that each row is matched to
          at least one column (which is not guaranteed otherwise if the
          matched_threshold is high). Defaults to False. See
          argmax_matcher_test.testMatcherForceMatch() for an example.
  
      Raises:
        ValueError: if unmatched_threshold is set but matched_threshold is not set
          or if unmatched_threshold > matched_threshold.
      """
      if (matched_threshold is None) and (
          unmatched_threshold is not None
      ):
          raise ValueError(
              "Need to also define matched_threshold when"
              "unmatched_threshold is defined"
          )
      self._matched_threshold = matched_threshold
      if unmatched_threshold is None:
          self._unmatched_threshold = matched_threshold
      else:
          if unmatched_threshold > matched_threshold:
              raise ValueError(
                  "unmatched_threshold needs to be smaller or equal"
                  "to matched_threshold"
              )
          self._unmatched_threshold = unmatched_threshold
      if not negatives_lower_than_unmatched:
          if self._unmatched_threshold == self._matched_threshold:
              raise ValueError(
                  "When negatives are in between matched and "
                  "unmatched thresholds, these cannot be of equal "
                  "value. matched: %s, unmatched: %s",
                  self._matched_threshold,
                  self._unmatched_threshold,
              )
      self._force_match_for_each_row = force_match_for_each_row
      self._negatives_lower_than_unmatched = (
          negatives_lower_than_unmatched
      )
  
imports: import tensorflow.compat.v1
  from .None import matcher
  from .None import shape_utils
label_desc: Use image node_id 1 to create a new ArgMaxMatcher object from inherited base classes: matcher with example: obj = ArgMaxMatcher(matched_threshold, unmatched_threshold, negatives_lower_than_unmatched, force_match_for_each_row)