Class Custom

Inheritance Relationships

Base Type

  • public mindspore::ops::BaseOperator

Class Documentation

class Custom : public mindspore::ops::BaseOperator

Custom defined user-defined operator prototype.

Public Functions

inline Custom()

Constructor.

void Init(const std::string &type, const std::map<std::string, std::vector<uint8_t>> &attrs)

Method to init the op’s attributes.

参数
  • type[in] Define the concrete type of the custom op, which is used to distinguish different custom op.

  • attrs[in] Define the attributes of the custom op.

void set_type(const std::string &type)

Method to set type attribute.

参数

type[in] Define the concrete type of the custom op, which is used to distinguish different custom op.

std::string get_type() const

Method to get type attribute.

返回

a string

void set_attr(const std::map<std::string, std::vector<uint8_t>> &attrs)

Method to set attr attribute.

参数

attrs[in] Define the attributes of the custom op.

std::map<std::string, std::vector<uint8_t>> get_attr() const

Method to get attr attribute.

返回

a map which contains all attributes of the custom op.