!12660 fix gpu bceloss bug

From: @huaweib
Reviewed-by: @zhoufeng54,@chujinjin
Signed-off-by: @chujinjin
This commit is contained in:
mindspore-ci-bot 2021-02-27 11:02:36 +08:00 committed by Gitee
commit a7bfc16aca
1 changed files with 1 additions and 1 deletions

View File

@ -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();