|
- From 8359643b0ebd9d0931110bd7776080abd2f2259d Mon Sep 17 00:00:00 2001
- From: lzk <liuzhongkai2@huawei.com>
- Date: Fri, 21 May 2021 01:37:26 -0700
- Subject: [PATCH] common_infer bug
-
- ---
- .../backend/kernel_compiler/cpu/nnacl/infer/common_infer.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
- diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c
- index 20c15559ed..c422a9c1ab 100644
- --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c
- +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c
- @@ -302,7 +302,7 @@ int ShapeInsert(int *shape, size_t *shape_size, int index, int value) {
- }
-
- int ShapeErase(int *shape, size_t *shape_size, int index) {
- - if (index < 0 && index >= *shape_size) {
- + if (index < 0 || index >= *shape_size) {
- return NNACL_ERR;
- }
-
- --
- 2.17.1
|