From e33af2414b1ae92de4c1589e3829a6bcc515dd21 Mon Sep 17 00:00:00 2001 From: dzhwinter Date: Thu, 22 Mar 2018 04:34:16 -0700 Subject: [PATCH] "fast hack" --- paddle/fluid/operators/dropout_op.cu | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/fluid/operators/dropout_op.cu b/paddle/fluid/operators/dropout_op.cu index f6c85a2a537..94382739b50 100644 --- a/paddle/fluid/operators/dropout_op.cu +++ b/paddle/fluid/operators/dropout_op.cu @@ -33,6 +33,7 @@ __global__ void RandomGenerator(const size_t n, const int seed, int idx = blockDim.x * blockIdx.x + threadIdx.x; for (; idx < n; idx += blockDim.x * gridDim.x) { + rng.discard(idx); if (dist(rng) < dropout_prob) { mask_data[idx] = static_cast(0); } else { -- GitLab