Browse Source

!13602 Modify MaximumGrad op

From: @ZhengQihao3f3f3f
Reviewed-by: @wuxuejian,@liangchenghui
Signed-off-by: @wuxuejian
pull/13602/MERGE
mindspore-ci-bot Gitee 5 years ago
parent
commit
0bc62d6f4c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/maximum_grad_cpu_kernel.cc

+ 1
- 1
mindspore/ccsrc/backend/kernel_compiler/cpu/maximum_grad_cpu_kernel.cc View File

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


Loading…
Cancel
Save