From 0a89ad3a64db4a6140fc38906d52f0609eb4b375 Mon Sep 17 00:00:00 2001 From: jonwe Date: Thu, 17 Dec 2020 08:53:03 -0500 Subject: [PATCH] SampledSoftmaxLoss stuck issue --- .../gpu/random/uniform_candidate_sampler_gpu_kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ccsrc/backend/kernel_compiler/gpu/random/uniform_candidate_sampler_gpu_kernel.h b/mindspore/ccsrc/backend/kernel_compiler/gpu/random/uniform_candidate_sampler_gpu_kernel.h index 7ea4ab3ed3..c8a3b4b8a2 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/gpu/random/uniform_candidate_sampler_gpu_kernel.h +++ b/mindspore/ccsrc/backend/kernel_compiler/gpu/random/uniform_candidate_sampler_gpu_kernel.h @@ -96,7 +96,7 @@ class UniformCandidateSamplerGpuKernel : public GpuKernel { return false; } input_size_ = input_shape[0] * input_shape[1]; - if (num_sampled_ * num_true_ + static_cast(input_size_) > range_max_ * num_true_) { + if (num_sampled_ + static_cast(input_size_) > range_max_) { remove_accidental_hits_ = false; } InitSizeLists();