parameters: (self, labels)
return_statement: return labels_unpacked
docstring: Unpacks an array of labels into multiscales labels.
docstring_summary: Unpacks an array of labels into multiscales labels.
docstring_tokens: Unpacks an array of labels into multiscales labels .
function: def _unpack_labels(self, labels):
          """Unpacks an array of labels into multiscales labels."""
          labels_unpacked = collections.OrderedDict()
          anchors = self._anchors
          count = 0
          for level in range(anchors.min_level, anchors.max_level + 1):
              feat_size = anchors.feat_sizes[level]
              steps = (
                  feat_size["height"]
                  * feat_size["width"]
                  * anchors.get_anchors_per_location()
              )
              indices = tf.range(count, count + steps)
              count += steps
              labels_unpacked[level] = tf.reshape(
                  tf.gather(labels, indices),
                  [feat_size["height"], feat_size["width"], -1],
              )
          return labels_unpacked
function_tokens: def _unpack_labels ( self , labels ) : labels_unpacked = collections . OrderedDict ( ) anchors = self . _anchors count = 0 for level in range ( anchors . min_level , anchors . max_level + 1 ) : feat_size = anchors . feat_sizes [ level ] steps = ( feat_size [ "height" ] * feat_size [ "width" ] * anchors . get_anchors_per_location ( ) ) indices = tf . range ( count , count + steps ) count += steps labels_unpacked [ level ] = tf . reshape ( tf . gather ( labels , indices ) , [ feat_size [ "height" ] , feat_size [ "width" ] , - 1 ] , ) return labels_unpacked