Class CNode
- Defined in File anf.h 
Inheritance Relationships
Base Type
- public mindspore::api::AnfNode(Class AnfNode)
Class Documentation
- 
class CNode : public mindspore::api::AnfNode
- CNode represents a compute node with a set of input nodes. - Public Functions - 
AnfNodePtr input(size_t i) const
- Get the input node of the given index. - 参数
- i – [in] The given index. 
- 返回
- The input node of the given index. 
 
 - 
void set_inputs(const std::vector<AnfNodePtr> &inputs)
- Set the input nodes for this CNode. - 参数
- inputs – [in] Input nodes. 
 
 - 
void add_input(const AnfNodePtr &input)
- Add an input node to this CNode. - 参数
- input – [in] the input node to be added. 
 
 - 
void set_fullname_with_scope(const std::string &full_name)
- Set fullname_with_scope for this CNode. - 参数
- full_name – [in] The fullname_with_scope. 
 
 - 
void AddAttr(const std::string &name, const ValuePtr &attr)
- Add a new attribute to this CNode. - 参数
- name – [in] The name of the new attribute. 
- attr – [in] The value of the new attribute. 
 
 
 - 
void EraseAttr(const std::string &name)
- Erase the attribute with the given name. - 参数
- name – [in] The name of attribute. 
 
 - 
ValuePtr GetAttr(const std::string &name) const
- Get the attribute with the given name. - 参数
- name – [in] The name of attribute. 
- 返回
- Attribute. 
 
 
- 
AnfNodePtr input(size_t i) const