You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/10/21 03:11:37 UTC

[GitHub] [incubator-mxnet] szha commented on a change in pull request #16532: fix dropout gpu seed

szha commented on a change in pull request #16532: fix dropout gpu seed
URL: https://github.com/apache/incubator-mxnet/pull/16532#discussion_r336825080
 
 

 ##########
 File path: src/operator/nn/dropout-inl.h
 ##########
 @@ -262,7 +262,7 @@ class DropoutOp {
         Tensor<xpu, 1, unsigned>(reinterpret_cast<unsigned *>(workspace_ptr),
                                  Shape1(1), s);
       prnd->GetRandInt(random_number);
-      uint64_t seed_ = 17 + reinterpret_cast<uint64_t>(&random_number) % 4096;
+      uint64_t seed_ = 17 + reinterpret_cast<uint64_t>(random_number.dptr_) % 4096;
 
 Review comment:
   dptr_ is a pointer and I don't think you mean to use its address here.

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