1 /** 2 * Copyright 2020 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 MINDSPORE_NNACL_POOLING_PARAMETER_H_ 17 #define MINDSPORE_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 RoundMode { RoundMode_No, RoundMode_Ceil, RoundMode_Floor } RoundMode; 24 25 typedef struct PoolingParameter { 26 // Primitive parameter 27 OpParameter op_parameter_; 28 PoolMode pool_mode_; 29 RoundMode round_mode_; 30 PadMode pad_mode_; 31 ActType act_type_; 32 int avg_mode_; 33 bool global_; 34 int window_w_; 35 int window_h_; 36 int stride_w_; 37 int stride_h_; 38 // shape correlative 39 int input_w_; 40 int input_h_; 41 int input_batch_; 42 int input_channel_; 43 int output_w_; 44 int output_h_; 45 int output_batch_; 46 int output_channel_; 47 int pad_u_; 48 int pad_d_; 49 int pad_l_; 50 int pad_r_; 51 // other parameter 52 int thread_num_; 53 QuantArg **quant_args_; 54 bool quantize_; 55 } PoolingParameter; 56 57 #endif // MINDSPORE_NNACL_POOLING_PARAMETER_H_ 58