Function mindspore::api::GetValueNode

Function Documentation

inline ValuePtr mindspore::api::GetValueNode(const AnfNodePtr &node)

Get the value from a node if it is a ValueNode.

Get the value with the given type from a node if it is a ValueNode.

参数
  • node[in] The node which may hold a value.

  • node[in] The node which may hold a value.

返回

A pointer to the value, nullptr if the node is not a ValueNode, or value not set.

返回

A pointer to the value, nullptr if the node is not a ValueNode, or value not set, or value type is mismatch.