class_docstr: GrapplerItem.
docstr: Creates an Item.
  
  Args:
    metagraph: a TensorFlow metagraph.
    ignore_colocation: if set, the tool will ignore all the colocation
      constraints generated by TensorFlow.
    ignore_user_placement: if set, all the placement annotations annotated in
      the metagraph will be ignored.
  Raises:
    ValueError: the metagraph is incomplete or invalid.
code: def __init__(
      self,
      metagraph,
      ignore_colocation=True,
      ignore_user_placement=False,
  ):
      """Creates an Item.
  
      Args:
        metagraph: a TensorFlow metagraph.
        ignore_colocation: if set, the tool will ignore all the colocation
          constraints generated by TensorFlow.
        ignore_user_placement: if set, all the placement annotations annotated in
          the metagraph will be ignored.
      Raises:
        ValueError: the metagraph is incomplete or invalid.
      """
      self._metagraph = metagraph
      self._item_graph = meta_graph_pb2.MetaGraphDef()
      self._item_graph.CopyFrom(metagraph)
      self._ignore_colocation = ignore_colocation
      self._ignore_user_placement = ignore_user_placement
      self._tf_item = None
      self._BuildTFItem()
  
file_path: tensorflow/tensorflow/python/grappler/item.py
imports: from tensorflow.core.grappler.costs import op_performance_data_pb2
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.python.grappler import _pywrap_tf_item
label_desc: Use image node_id 1 to create a new Item object from inherited base classes: object with example: obj = Item(metagraph, ignore_colocation, ignore_user_placement)