You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by GitBox <gi...@apache.org> on 2020/03/20 02:16:12 UTC

[GitHub] [singa] nudles commented on a change in pull request #632: make astype return new tensor

nudles commented on a change in pull request #632: make astype return new tensor
URL: https://github.com/apache/singa/pull/632#discussion_r395412130
 
 

 ##########
 File path: src/core/tensor/tensor.cc
 ##########
 @@ -152,29 +152,24 @@ Tensor Resize(const Tensor &in, const Shape &shape) {
     }                                                                          \
   } while (0)
 
-Tensor &Tensor::AsType(const DataType type) {
+// return new tensor
+Tensor Tensor::AsType(const DataType type) {
 
 Review comment:
   do we need to add a flag for in-place? default can be False.

----------------------------------------------------------------
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