Merge pull request #9325 from dzhwinter/fix/dropout1

"fast hack"
helinwang-patch-1
武毅 7 years ago committed by GitHub
commit 12856c5f69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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<T>(0);
} else {

Loading…
Cancel
Save