singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wangwei (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SINGA-207) Update Tensor functions for matrices
Date Mon, 27 Jun 2016 12:14:51 GMT
wangwei created SINGA-207:
-----------------------------

             Summary: Update Tensor functions for matrices
                 Key: SINGA-207
                 URL: https://issues.apache.org/jira/browse/SINGA-207
             Project: Singa
          Issue Type: Improvement
            Reporter: wangwei


Operations like AddRow, SumRows, AddColumn, SumColumns, SoftMax, MultRow, DivRow, etc. are
specific for matrices. 
However, for CNN (and some other) models, the tensors usually have 4 dimensions (batch, channel,
height and width). To use the above functions, we have to reshape the tensors into matrices
and reshape them back after calling these functions. To make it easy to use these functions,
this ticket would update the function API, e.g.,
{code}
void AddRow(const Tensor& row, Tensor* mat);    // old API, the mat must be a matrix
void AddRow(const Tensor& row, Tensor* mat, int axis = 1);  // new API, the mat could
have nDim() > 2.
{code}
The axis argument indicates that the dimension [0, axis) would be reshaped as the row dimension,
and [axis, ...) would be reshaped as the column dimension.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message