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/04/08 15:44:28 UTC

[GitHub] [singa] XJDKC commented on a change in pull request #667: Fix bugs of training

XJDKC commented on a change in pull request #667: Fix bugs of training
URL: https://github.com/apache/singa/pull/667#discussion_r405624332
 
 

 ##########
 File path: src/core/tensor/tensor.cc
 ##########
 @@ -161,6 +161,9 @@ Tensor Resize(const Tensor &in, const Shape &shape) {
 
 // return new tensor
 Tensor Tensor::AsType(const DataType type) {
+  CHECK(block() && block()->initialized() == true)
+      << "the data of the tensor needs be initialized before casting to "
 
 Review comment:
   Done.

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