1 /** 2 * Copyright 2020-2023 Huawei Technologies Co., Ltd 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #ifndef NNACL_POOLING_PARAMETER_H_ 17 #define NNACL_POOLING_PARAMETER_H_ 18 19 #include "nnacl/op_base.h" 20 21 typedef enum PoolMode { PoolMode_No, PoolMode_MaxPool, PoolMode_AvgPool } PoolMode; 22 23 typedef enum RoundType { RoundType_No, RoundType_Ceil, RoundType_Floor } RoundType; 24 25 typedef struct PoolingParameter { 26 OpParameter op_parameter_; 27 PoolMode pool_mode_; 28 RoundType round_type_; 29 PadType pad_mode_; 30 ActType act_type_; 31 int avg_mode_; 32 bool global_; 33 int window_w_; 34 int window_h_; 35 int stride_w_; 36 int stride_h_; 37 int pad_u_; 38 int pad_d_; 39 int pad_l_; 40 int pad_r_; 41 } PoolingParameter; 42 43 typedef struct Pooling3DParameter { 44 PoolingParameter pooling_parameter_; 45 int window_d_; 46 int stride_d_; 47 int input_d_; 48 int output_d_; 49 int pad_f_; // front 50 int pad_b_; // back 51 bool count_include_pad_; 52 int divisor_override_; 53 } Pooling3DParameter; 54 55 #endif // NNACL_POOLING_PARAMETER_H_ 56