lebeg commented on a change in pull request #11148: [MXNET-679] Refactor 
handling BLAS libraries with cmake
URL: https://github.com/apache/incubator-mxnet/pull/11148#discussion_r209664405
 
 

 ##########
 File path: src/operator/rnn_impl.h
 ##########
 @@ -174,17 +174,21 @@ void LstmForwardTraining(DType* ws,
       w_ptr += w_size;
       b_ptr += b_size;
       if (dropout > 0.0f) {
-        #pragma omp parallel for num_threads(omp_threads)
-        for (int j = 0; j < T * N * H * D; j++) {
-          int rand_data = rand_r(&seed_);
-          if (static_cast<float>(rand_data % 1000) < static_cast<float>(1000 * 
dropout)) {
-            dropout_random[i * T * N * H * D + j] = 0;
-            y.dptr_[j] = 0;
-          } else {
-            dropout_random[i * T * N * H * D + j] = 1.0f - dropout;
-            y.dptr_[j] =  y.dptr_[j] / (1.0f - dropout);
+          #pragma omp parallel for num_threads(omp_threads)
+          for (int j = 0; j < T * N * H * D; j++) {
 
 Review comment:
   Maybe I'll leave it for later improvements, since it's not related to the 
main change

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


With regards,
Apache Git Services

Reply via email to