class_docstr: A Matcher implementing bipartite matching strategy.
  
  Parameters
  ----------
  threshold : float
      Threshold used to ignore invalid paddings
  is_ascend : bool
      Whether sort matching order in ascending order. Default is False.
  eps : float
      Epsilon for floating number comparison
  share_max : bool, default is True
      The maximum overlap between anchor/gt is shared by multiple ground truths.
      We recommend Fast(er)-RCNN series to use ``True``, while for SSD, it should
      defaults to ``False`` for better result.
docstr: BipartiteMatching
  
  Parameters:
  ----------
  x : NDArray or Symbol
      IOU overlaps with shape (N, M), batching is supported.
docstr_tok: ["BipartiteMatching","Parameters",":","--","--","--","--","--","x",":","NDArray","or","Symbol","IOU","overlaps","with","shape","(","N",",","M",")",",","batching","is","supported","."]
code: def hybrid_forward(self, F, x):
      """BipartiteMatching
  
      Parameters:
      ----------
      x : NDArray or Symbol
          IOU overlaps with shape (N, M), batching is supported.
  
      """
      match = F.contrib.bipartite_matching(
          x, threshold=self._threshold, is_ascend=self._is_ascend
      )
      # make sure if iou(a, y) == iou(b, y), then b should also be a good match
      # otherwise positive/negative samples are confusing
      # potential argmax and max
      pargmax = x.argmax(axis=-1, keepdims=True)  # (B, num_anchor, 1)
      maxs = x.max(axis=-2, keepdims=True)  # (B, 1, num_gt)
      if self._share_max:
          mask = F.broadcast_greater_equal(
              x + self._eps, maxs
          )  # (B, num_anchor, num_gt)
          mask = F.sum(
              mask, axis=-1, keepdims=True
          )  # (B, num_anchor, 1)
      else:
          pmax = F.pick(
              x, pargmax, axis=-1, keepdims=True
          )  # (B, num_anchor, 1)
          mask = F.broadcast_greater_equal(
              pmax + self._eps, maxs
          )  # (B, num_anchor, num_gt)
          mask = F.pick(
              mask, pargmax, axis=-1, keepdims=True
          )  # (B, num_anchor, 1)
      new_match = F.where(mask > 0, pargmax, F.ones_like(pargmax) * -1)
      result = F.where(
          match[0] < 0, new_match.squeeze(axis=-1), match[0]
      )
      return result
  
file_path: gluon-cv/gluoncv/nn/matcher.py
imports: from __future__ import absolute_import
  from mxnet import gluon
  from mxnet.gluon import nn
label_desc: Use image node_id 2 for calling the BipartiteMatcher obj's underlying member method code with example usage: obj.hybrid_forward(F, x) and returns: result