singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] dcslin commented on issue #580: [WIP] SINGA-505 An experiment for buffering operations
Date Sat, 01 Feb 2020 07:02:56 GMT
dcslin commented on issue #580: [WIP] SINGA-505 An experiment for buffering operations
URL: https://github.com/apache/singa/pull/580#issuecomment-581002067
 
 
   > 1. It should be better to return a Tensor instance. To keep it compatible, we can
add a new function, sum_at() (returns a tensor), and mark the original sum() as deprecated.
When we release v3.0, we mark sum_at as deprecated and change the sum() to return a tensor.
This is to follow the convention of the X.Y.Z version style.
   > 2. Is it more common to pass axis as an integer than an array? Do we need to do summation
along multiple dimensions?
   
   Hi @nudles , regarding 1:
   currently in Dev:
   ```
   Tensor SumAll(const Tensor &in);
   Tensor Sum(const Tensor &in, const int axis);
   SType Sum(const Tensor &in);
   ```
   do you mean we should change to:
   ```
   V2.x.x
   Tensor SumAll(const Tensor &in);
   Deprecated{Tensor Sum(const Tensor &in, const int axis);}
   SType Sum(const Tensor &in);
   Tesnor SumAt(const Tensor &in, const int axis);
   ```
   and at V3.0
   ```
   V3.0
   Tensor SumAll(const Tensor &in);
   Tensor Sum(const Tensor &in, const int axis);
   Tensor Sum(const Tensor &in);
   Deprecated{Tesnor SumAt(const Tensor &in, const int axis);}
   ```
   
   As mentioned by Chris, SumAll is already merged, and everything should work now... My comment
was not aware of that.
   
   Maybe we could just change `SType Sum()` to `SType SumValue()`.
   
   Regarding 2. passing axis as array is just an API supported by both numpy, torch.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message