Uploaded image for project: 'SystemDS'
  1. SystemDS
  2. SYSTEMDS-1736

Add new 2D top_k utility function

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • SystemML 0.15
    • None
    • None

    Description

      We should add a new top_k2d utility function (in nn/util.dml) that accepts a matrix X and return matrices values and indices with the top k values (i.e. probabilities) and associated indices (i.e. classes) along a certain dimension. This will be modeled after the top_k function in TensorFlow . For the 2D case, top_k will operate on the channels dimension. A typical use case here is that in which X is the output of a softmax2d layer (so each channel contains a set of normalized class probabilities), and values and indices will contain the top k probabilities and indices along the channel axis. This scenario would be common in an image segmentation problem, in which every pixel of the output image will have a set of class probabilities along the channel axis.

      Having these top-k functions will allow us to extract either predict a single class for each item, or the top k classes, and therefore may be more useful that a predict_class function.

      Although we will use values and indices as the names of the returned matrices within the functions, in practice, one is likely to name the results probs and classes in the calling environment.

      Attachments

        Activity

          People

            Tenma Fei Hu
            dusenberrymw Mike Dusenberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: