forked from mindspore-Ecosystem/mindspore
fix global avg pooling infer
This commit is contained in:
parent
180a3b6a55
commit
a2cc45ca46
|
@ -72,7 +72,7 @@ int PoolingInferShape(const TensorC *const *inputs, size_t inputs_size, TensorC
|
|||
}
|
||||
int output_h = 0;
|
||||
int output_w = 0;
|
||||
if (param->stride_h_ == 0 || param->stride_w_ == 0) {
|
||||
if ((param->stride_h_ == 0 || param->stride_w_ == 0) && !param->global_) {
|
||||
return NNACL_PARAM_INVALID;
|
||||
}
|
||||
if (param->pad_mode_ == Pad_same) {
|
||||
|
|
Loading…
Reference in New Issue