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.

Parameters

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.