Program Listing for File one_hot.h
↰ Return to documentation for file (include/converter/include/ops/one_hot.h
)
#ifndef MINDSPORE_CORE_OPS_ONE_HOT_H_
#define MINDSPORE_CORE_OPS_ONE_HOT_H_
#include <memory>
#include <vector>
#include "mindapi/base/types.h"
#include "ops/base_operator.h"
namespace mindspore {
namespace ops {
constexpr auto kNameOneHot = "OneHot";
class MIND_API OneHot : public BaseOperator {
public:
MIND_API_BASE_MEMBER(OneHot);
OneHot() : BaseOperator(kNameOneHot) { InitIOName({"indices", "depth", "on_value", "off_value"}, {"output"}); }
void Init(const int64_t axis);
void set_axis(const int64_t axis);
int64_t get_axis() const;
};
} // namespace ops
} // namespace mindspore
#endif // MINDSPORE_CORE_OPS_ONE_HOT_H_