{"record":{"id":"1b8d19ad8938b6c9","repo":"tensorflow/models","slug":"when-negatives-are-in-between-matched-and-unmatche","errorCode":null,"errorMessage":"When negatives are in between matched and unmatched thresholds, these cannot be of equal value. matched: %s, unmatched: %s","messagePattern":"When negatives are in between matched and unmatched thresholds, these cannot be of equal value\\. matched: (.+?), unmatched: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/vision/utils/object_detection/argmax_matcher.py","lineNumber":95,"sourceCode":"\n    Raises:\n      ValueError: if unmatched_threshold is set but matched_threshold is not set\n        or if unmatched_threshold > matched_threshold.\n    \"\"\"\n    if (matched_threshold is None) and (unmatched_threshold is not None):\n      raise ValueError('Need to also define matched_threshold when'\n                       'unmatched_threshold is defined')\n    self._matched_threshold = matched_threshold\n    if unmatched_threshold is None:\n      self._unmatched_threshold = matched_threshold\n    else:\n      if unmatched_threshold > matched_threshold:\n        raise ValueError('unmatched_threshold needs to be smaller or equal'\n                         'to matched_threshold')\n      self._unmatched_threshold = unmatched_threshold\n    if not negatives_lower_than_unmatched:\n      if self._unmatched_threshold == self._matched_threshold:\n        raise ValueError('When negatives are in between matched and '\n                         'unmatched thresholds, these cannot be of equal '\n                         'value. matched: %s, unmatched: %s',\n                         self._matched_threshold, self._unmatched_threshold)\n    self._force_match_for_each_row = force_match_for_each_row\n    self._negatives_lower_than_unmatched = negatives_lower_than_unmatched\n\n  def _match(self, similarity_matrix):\n    \"\"\"Tries to match each column of the similarity matrix to a row.\n\n    Args:\n      similarity_matrix: tensor of shape [N, M] representing any similarity\n        metric.\n\n    Returns:\n      Match object with corresponding matches for each of M columns.\n    \"\"\"\n\n    def _match_when_rows_are_empty():","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/utils/object_detection/argmax_matcher.py#L77-L113","documentation":"Error \"When negatives are in between matched and unmatched thresholds, these cannot be of equal value. matched: %s, unmatched: %s\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/utils/object_detection/argmax_matcher.py:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use distinct matched and unmatched thresholds when negatives can fall between them.","Set use_matrices/defaults so the thresholds differ, or ensure no negatives fall in between."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}