forked from mindspore-Ecosystem/mindspore
fix bug of reduce ops infer value
This commit is contained in:
parent
f98497ca09
commit
c336870af2
|
@ -352,7 +352,7 @@ class _Reduce(PrimitiveWithInfer):
|
||||||
|
|
||||||
if np_reduce_func is not None:
|
if np_reduce_func is not None:
|
||||||
value = input_x['value'].asnumpy()
|
value = input_x['value'].asnumpy()
|
||||||
if not axis_v:
|
if not axis_v and axis_v != 0:
|
||||||
axis_v = [i for i in range(len(input_x['shape']))]
|
axis_v = [i for i in range(len(input_x['shape']))]
|
||||||
axis_v = tuple(axis_v)
|
axis_v = tuple(axis_v)
|
||||||
value = np_reduce_func(value, axis_v, keepdims=self.keep_dims)
|
value = np_reduce_func(value, axis_v, keepdims=self.keep_dims)
|
||||||
|
|
Loading…
Reference in New Issue