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.

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

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

Returns

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

Returns

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