fix global avg pooling infer

This commit is contained in:
zhaodezan 2022-01-18 20:39:01 +08:00
parent 180a3b6a55
commit a2cc45ca46
1 changed files with 1 additions and 1 deletions

View File

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