目录

SetInputAttr

Function Description

Sets the attribute value of the operator input tensor.

An operator may have multiple attributes. Once the value of an attribute is initially set, the data type of the attribute is fixed. The following data types are supported:

Function Prototype

Operator &SetInputAttr(const int32_t index, const char_t *name, const char_t *attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, const char_t *attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, const AscendString &attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, const AscendString &attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, int64_t attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, int64_t attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, int32_t attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, int32_t attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, uint32_t attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, uint32_t attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, bool attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, bool attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, float32_t attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, float32_t attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, const std::vector<AscendString> &attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, const std::vector<AscendString> &attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, const std::vector<int64_t> &attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, const std::vector<int64_t> &attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, const std::vector<int32_t> &attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, const std::vector<int32_t> &attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, const std::vector<uint32_t> &attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, const std::vector<uint32_t> &attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, const std::vector<bool> &attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, const std::vector<bool> &attr_value);
Operator &SetInputAttr(const int32_t index, const char_t *name, const std::vector<float32_t> &attr_value);
Operator &SetInputAttr(const char_t *dst_name, const char_t *name, const std::vector<float32_t> &attr_value);

Parameters

Parameter Input/Output Description
name Input Attribute name.
index Input Input index.
dst_name Input Input edge name.
attr_value Input Attribute value of type int64_t.
attr_value Input Attribute value of type int32_t.
attr_value Input Attribute value of type uint32_t.
attr_value Input Attribute value of type vector<int64_t>.
attr_value Input Attribute value of type vector<int32_t>.
attr_value Input Attribute value of type vector<uint32_t>.
attr_value Input Attribute value of the floating-point type.
attr_value Input Attribute value of the floating-point list type.
attr_value Input Attribute value of the bool type.
attr_value Input Attribute value of the bool list type.
attr_value Input Attribute value of the string type.
attr_value Input Attribute value of the string list type.

Return Value

Type Description
Operator& Object itself.

Exception Handling

None

Restrictions

None