MNN/source/backend/cpu/CPUArgMax.hpp

39 lines
872 B
C++
Raw Normal View History

2019-04-17 10:49:11 +08:00
//
// CPUArgMax.hpp
// MNN
//
// Created by MNN on 2018/07/17.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef CPUArgMax_hpp
#define CPUArgMax_hpp
#include "Execution.hpp"
namespace MNN {
class CPUArgMax : public Execution {
public:
CPUArgMax(Backend *backend, int topk, int outMaxVal, int softmaxThreshold, int axis);
2019-04-17 10:49:11 +08:00
virtual ~CPUArgMax() = default;
virtual ErrorCode onResize(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
private:
Tensor mInputBuffer;
Tensor mOutputBuffer;
2019-04-17 10:49:11 +08:00
int mTopk;
int mOutMaxVal;
int mSoftmaxThreshold;
int mAxis;
int mNum;
int mDim;
int mKeyExtent;
bool mFromNHWC;
2019-04-17 10:49:11 +08:00
};
} // namespace MNN
#endif /* CPUArgMax_hpp */