[ 
https://issues.apache.org/jira/browse/SINGA-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16539717#comment-16539717
 ] 

ASF subversion and git services commented on SINGA-380:
-------------------------------------------------------

Commit 58e6640df8d8f3572e15e818e59eb552ea314eaa in incubator-singa's branch 
refs/heads/master from Wang Wei
[ https://git-wip-us.apache.org/repos/asf?p=incubator-singa.git;h=58e6640 ]

SINGA-380 Fix bugs from Reshape

Add SoftmaxCrossEntropy Operation which accepts logits as input (Softmax is 
applied in the operation)
There is another operation for CrossEntropy which accepts probabilities as 
input.

Fix the memory leaking bug from Reshape in C++.

fix mem leak bug from reshape


> Fix bugs from Reshape 
> ----------------------
>
>                 Key: SINGA-380
>                 URL: https://issues.apache.org/jira/browse/SINGA-380
>             Project: Singa
>          Issue Type: Improvement
>            Reporter: wangwei
>            Priority: Major
>
> The current implementation of reshape operation has memory leak caused by the 
> dangling Tensor::block_ pointer.
> This ticket is going to fix the bug and update the Reshape API in C++ and 
> Python.
> For C++,
> {code:java}
> Class Tensor {
>  public:
>   Tensor& Reshape(const Shape & s); // change the internal shape and return a 
> the tensor itself
>  ...  
> };
> Tensor Reshape(const Tensor& t, const Shape& s); // create a new tensor with 
> the given shape; share the memory if possible.{code}
> For Python, the reshape operation from autograd.py always return a new 
> pytensor which shares the memory with the original tensor if possible.
> We change the API for transpose for C++ and Python in the same way.
> C++, Tensor method Transpose changes the internal fields and return the 
> tensor itself; the global method Transpose returns a new tensor which shares 
> the memory with the original tensor.
> Python, the transpose operation always returns a new tensor that shares 
> memory with the original tensor.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to