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/25 19:51:19 UTC

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

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

 ##########
 File path: src/operator/rnn-inl.h
 ##########
 @@ -1360,15 +1360,16 @@ class RNNOp {
       // Create Dropout descriptors
       if (param_.p > 0) {
          ctx.requested[rnn_enum::kCuDNNDropoutDescSpace].get_cudnn_dropout_desc
-            (&dropout_desc_, s, 1.0f - param_.p, seed_);
+            (&dropout_desc_, s, 1.0f - param_.p);
       }
       // Only update the probability by passing in a null dropout_states ptr
       DType* dropout_states = NULL;
       size_t dropout_bytes = 0;
+      // use dummy seed as state is null
       CUDNN_CALL(cudnnSetDropoutDescriptor(dropout_desc_, s->dnn_handle_,
                                            param_.p,  // discard probability
                                            dropout_states, dropout_bytes,
-                                           seed_));
+                                           0));
 
 Review comment:
   In the minimum, the comment should be updated.  The way these calls work is:
   cudnnSetDropoutDescriptor(..., dropout_states==NULL,...)    // Set dropout probability **and seed**, leave states alone.
   cudnnSetDropoutDescriptor(..., dropout_states!=NULL,...)    // Set dropout probability and seed, init states based on these values.
   
   cudnnRestoreDropoutDescriptor()    // Set dropout probability, seed and states ptr from provided args.

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