2019-04-17 10:49:11 +08:00
|
|
|
//
|
|
|
|
// CPUQuantizedAvgPool.hpp
|
|
|
|
// MNN
|
|
|
|
//
|
|
|
|
// Created by MNN on 2018/08/14.
|
|
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef CPUQuantizedAvgPool_HPP
|
|
|
|
#define CPUQuantizedAvgPool_HPP
|
|
|
|
|
2019-12-27 22:16:57 +08:00
|
|
|
#include "core/Execution.hpp"
|
2019-04-17 10:49:11 +08:00
|
|
|
#include "MNN_generated.h"
|
|
|
|
|
|
|
|
namespace MNN {
|
|
|
|
|
|
|
|
class CPUQuantizedAvgPool : public Execution {
|
|
|
|
public:
|
|
|
|
CPUQuantizedAvgPool(Backend *backend, const Op *CPUQuantizedAvgPoolOp);
|
|
|
|
virtual ~CPUQuantizedAvgPool() = default;
|
|
|
|
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
|
2019-05-05 20:27:57 +08:00
|
|
|
virtual ErrorCode onResize(const std::vector<Tensor*>& inputs, const std::vector<Tensor*>& outputs) override;
|
|
|
|
|
2019-04-17 10:49:11 +08:00
|
|
|
private:
|
|
|
|
int32_t mKernelWidth;
|
|
|
|
int32_t mKernelHeight;
|
|
|
|
int32_t mPadWidth;
|
|
|
|
int32_t mPadHeight;
|
|
|
|
int32_t mStrideWidth;
|
|
|
|
int32_t mStrideHeight;
|
|
|
|
PoolPadType mPadMode;
|
|
|
|
int mOutputActivationMin;
|
|
|
|
int mOutputActivationMax;
|
|
|
|
bool mIstflite;
|
2019-05-05 20:27:57 +08:00
|
|
|
std::vector<int> mInputDims;
|
|
|
|
std::vector<int> mOutputDims;
|
2019-04-17 10:49:11 +08:00
|
|
|
};
|
|
|
|
} // namespace MNN
|
|
|
|
|
|
|
|
#endif /* CPUQuantizedAvgPool.hpp */
|