Program Listing for File softmax.h

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

#ifndef MINDSPORE_CORE_OPS_SOFTMAX_H_
#define MINDSPORE_CORE_OPS_SOFTMAX_H_

#include <map>
#include <memory>
#include <string>
#include <vector>

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

namespace mindspore {
namespace ops {
constexpr auto kNameSoftmax = "Softmax";
class MIND_API Softmax : public BaseOperator {
 public:
  MIND_API_BASE_MEMBER(Softmax);
  Softmax() : BaseOperator(kNameSoftmax) { InitIOName({"x"}, {"output"}); }
  void Init(const int64_t axis = -1);
  void set_axis(const std::vector<int64_t> &axis);
  std::vector<int64_t> get_axis() const;
};

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

#endif  // MINDSPORE_CORE_OPS_SOFTMAX_H_