diff --git a/mindspore/ccsrc/kernel/gpu/cuda_impl/dropout_impl.cu b/mindspore/ccsrc/kernel/gpu/cuda_impl/dropout_impl.cu index bffa73fb76d124295ba29590fc792caba24c634d..940c64ea53dcc120d66154305a6e8b0ebf8d3730 100644 --- a/mindspore/ccsrc/kernel/gpu/cuda_impl/dropout_impl.cu +++ b/mindspore/ccsrc/kernel/gpu/cuda_impl/dropout_impl.cu @@ -20,7 +20,7 @@ __global__ void DropoutForwardKernel(const float *input, float *mask, float *output, size_t num_count, float drop_prob) { - float scale = 1.f / (1.f - drop_prob); + float scale = 1.f / drop_prob; for (size_t i = blockIdx.x * blockDim.x + threadIdx.x; i < num_count; i += blockDim.x * gridDim.x) { mask[i] = mask[i] > drop_prob; output[i] = scale * input[i] * mask[i];