You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Matthias Boehm (JIRA)" <ji...@apache.org> on 2017/06/03 01:47:04 UTC
[jira] [Created] (SYSTEMML-1659) New rewrite eliminate unnecessary
aggregates
Matthias Boehm created SYSTEMML-1659:
----------------------------------------
Summary: New rewrite eliminate unnecessary aggregates
Key: SYSTEMML-1659
URL: https://issues.apache.org/jira/browse/SYSTEMML-1659
Project: SystemML
Issue Type: Sub-task
Reporter: Matthias Boehm
There are some example scripts which use unnecessary aggregations for convenience of a consistent specification - hence, we should automatically eliminate these unnecessary aggregates, via a simple static rewrite.
{code}
# nn lib - cross_entropy_loss::forward (returns only loss)
N = nrow(y)
eps = 1e-10 # numerical stability to avoid log(0)
losses = rowSums(-y * log(pred+eps))
loss = sum(losses) / N
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)