From 4a3fcc086b77cdd7c55130ebfdcb37a105fec0e8 Mon Sep 17 00:00:00 2001 From: baihuawei Date: Fri, 26 Feb 2021 15:34:19 +0800 Subject: [PATCH] fix bceloss bug --- .../kernel_compiler/gpu/nn/binary_cross_entropy_gpu_kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ccsrc/backend/kernel_compiler/gpu/nn/binary_cross_entropy_gpu_kernel.h b/mindspore/ccsrc/backend/kernel_compiler/gpu/nn/binary_cross_entropy_gpu_kernel.h index e3764185d8..3ce4642017 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/gpu/nn/binary_cross_entropy_gpu_kernel.h +++ b/mindspore/ccsrc/backend/kernel_compiler/gpu/nn/binary_cross_entropy_gpu_kernel.h @@ -59,7 +59,7 @@ class BinaryCrossEntropyGpuKernel : public GpuKernel { reduction_ = 2; } workspace_size_ = sizeof(T); - if (reduction_ == 0) { + if (reduction_ != 0) { workspace_size_ *= input_size_; } InitSizeLists();