You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Mike Dusenberry (JIRA)" <ji...@apache.org> on 2017/06/28 19:27:00 UTC

[jira] [Resolved] (SYSTEMML-1678) Add new 1D top_k utility function

     [ https://issues.apache.org/jira/browse/SYSTEMML-1678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Dusenberry resolved SYSTEMML-1678.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: SystemML 1.0

Merged in [commit 2e78eb9 | https://github.com/apache/systemml/commit/2e78eb9a56148f9e27ea1cb646e2d6dd528d251e].

> Add new 1D top_k utility function
> ---------------------------------
>
>                 Key: SYSTEMML-1678
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-1678
>             Project: SystemML
>          Issue Type: Sub-task
>            Reporter: Mike Dusenberry
>            Assignee: Fei Hu
>             Fix For: SystemML 1.0
>
>
> We should add new {{top_k}} and {{top_k2d}} utility functions (in {{nn/util.dml}}) that accept 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 | https://www.tensorflow.org/api_docs/python/tf/nn/top_k]  For the 1D case, {{top_k}} will operate on the columns dimension.  A typical use case is that in which {{X}} is the output of a {{softmax}} layer (so each row contains a set of normalized class probabilities), and {{values}} and {{indices}} will contain rows with the top {{k}} probabilities and class indices as described above.  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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)