Program Listing for File max_pool_fusion.h

Return to documentation for file (include/converter/include/ops/fusion/max_pool_fusion.h)

#ifndef MINDSPORE_CORE_OPS_MAX_POOL_FUSION_H_
#define MINDSPORE_CORE_OPS_MAX_POOL_FUSION_H_
#include <memory>
#include <vector>

#include "mindapi/base/types.h"
#include "ops/max_pool.h"

namespace mindspore {
namespace ops {
constexpr auto kNameMaxPoolFusion = "MaxPoolFusion";
class MIND_API MaxPoolFusion : public MaxPool {
 public:
  MIND_API_BASE_MEMBER(MaxPoolFusion);
  MaxPoolFusion() : MaxPool(kNameMaxPoolFusion) { InitIOName({"x"}, {"output"}); }

  void Init(const std::vector<int64_t> &kernel_size = {1}, const std::vector<int64_t> &stride = {1},
            const PadMode &pad_mode = VALID, const Format &format = NCHW,
            const std::vector<int64_t> &pad = {0, 0, 0, 0}, const RoundMode &round_mode = FLOOR,
            const bool global = false, const ActivationType activation_type = NO_ACTIVATION);

  void set_global(const bool global);

  void set_activation_type(const ActivationType activation_type);

  bool get_global() const;

  ActivationType get_activation_type() const;
};

abstract::AbstractBasePtr MaxPoolFusionInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
                                             const std::vector<abstract::AbstractBasePtr> &input_args);
}  // namespace ops
}  // namespace mindspore

#endif  // MINDSPORE_CORE_OPS_MAX_POOL_FUSION_H_