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.

Parameters
  • 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.

Parameters

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.

Returns

a string

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

Method to set attr attribute.

Parameters

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.

Returns

a map which contains all attributes of the custom op.