Function mindspore::api::IsPrimitive

Function Documentation

bool mindspore::api::IsPrimitive(const AnfNodePtr &node, const PrimitivePtr &prim)

Check whether the given node is a ValueNode with the given Primitive.

参数
  • node[in] The given node to be checked.

  • prim[in] The Primitive value.

返回

True if the given node is a ValueNode with the given Primitive, false otherwise.