[
https://issues.apache.org/jira/browse/SYSTEMML-1678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mike Dusenberry updated SYSTEMML-1678:
--------------------------------------
Description:
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. 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.
was:We should add new {{predict_class}} and {{predict_class2d}} utility
functions (in {{nn/util.dml}}) that accept a matrix {{X}} and return a matrix
{{out}} with the predicted classes based on the max probability. For the 1D
case, {{X}} is the output of a {{softmax}} layer, and thus each row will
contain a set of normalized class probabilities
> Add new 1D & 2D top_k utility functions
> ---------------------------------------
>
> Key: SYSTEMML-1678
> URL: https://issues.apache.org/jira/browse/SYSTEMML-1678
> Project: SystemML
> Issue Type: Sub-task
> Reporter: Mike Dusenberry
> Assignee: Mike Dusenberry
>
> 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. 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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)