From f3a1a69ce52b07055d9bb9504bc6ff717e9f82ea Mon Sep 17 00:00:00 2001 From: zhengqihao Date: Fri, 19 Mar 2021 15:00:12 +0800 Subject: [PATCH] modified MaximumGrad --- .../backend/kernel_compiler/cpu/maximum_grad_cpu_kernel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/maximum_grad_cpu_kernel.cc b/mindspore/ccsrc/backend/kernel_compiler/cpu/maximum_grad_cpu_kernel.cc index 1dd67b378e..e264996d76 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/maximum_grad_cpu_kernel.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/maximum_grad_cpu_kernel.cc @@ -63,7 +63,7 @@ void MaximumGradRecTask(T *x, T *y, T *dout, T *dx, T *dy, size_t dim, size_t x_ size_t dout_i = i * dout_cargo[dim]; if (dim == dout_shape.size() - 1) { - if (*(x + x_index + x_i) >= *(y + y_index + y_i)) { + if (*(x + x_index + x_i) > *(y + y_index + y_i)) { *(dx + x_index + x_i) += *(dout + dout_index + i); } else { *(dy + y_index + y_i) += *(dout + dout_index + i);