class_docstr: An iterator over `tf.distribute.DistributedDataset`.
  
  `tf.distribute.DistributedIterator` is the primary mechanism for enumerating
  elements of a `tf.distribute.DistributedDataset`. It supports the Python
  Iterator protocol, which means it can be iterated over using a for-loop or by
  fetching individual elements explicitly via `get_next()`.
  
  You can create a `tf.distribute.DistributedIterator` by calling `iter` on
  a `tf.distribute.DistributedDataset` or creating a python loop over a
  `tf.distribute.DistributedDataset`.
  
  Visit the [tutorial](https://www.tensorflow.org/tutorials/distribute/input)
  on distributed input for more examples and caveats.
class_docstr_tok: ["An","iterator","over","`","tf.distribute.DistributedDataset","`",".","`","tf.distribute.DistributedIterator","`","is","the","primary","mechanism","for","enumerating","elements","of","a","`","tf.distribute.DistributedDataset","`",".","It","supports","the","Python","Iterator","protocol",",","which","means","it","can","be","iterated","over","using","a","for-loop","or","by","fetching","individual","elements","explicitly","via","`","get_next","(",")","`",".","You","can","create","a","`","tf.distribute.DistributedIterator","`","by","calling","`","iter","`","on","a","`","tf.distribute.DistributedDataset","`","or","creating","a","python","loop","over","a","`","tf.distribute.DistributedDataset","`",".","Visit","the","[","tutorial","]","(","https",":","\/\/www.tensorflow.org\/tutorials\/distribute\/input",")","on","distributed","input","for","more","examples","and","caveats","."]
docstr: The type specification of an element of `tf.distribute.DistributedIterator`.
  
  Example usage:
  
  >>> global_batch_size = 16
  >>> strategy = tf.distribute.MirroredStrategy(["GPU:0", "GPU:1"])
  >>> dataset = tf.data.Dataset.from_tensors(([1.],[2])).repeat(100).batch(global_batch_size)
  >>> distributed_iterator = iter(strategy.experimental_distribute_dataset(dataset))
  >>> distributed_iterator.element_spec
  (PerReplicaSpec(TensorSpec(shape=(None, 1), dtype=tf.float32, name=None),
                  TensorSpec(shape=(None, 1), dtype=tf.float32, name=None)),
   PerReplicaSpec(TensorSpec(shape=(None, 1), dtype=tf.int32, name=None),
                  TensorSpec(shape=(None, 1), dtype=tf.int32, name=None)))
  
  Returns:
    A nested structure of `tf.TypeSpec` objects matching the structure of an
    element of this `tf.distribute.DistributedIterator`. This returned value
    is typically a `tf.distribute.DistributedValues` object and specifies the
    `tf.TensorSpec` of individual components.
docstr_tok: ["The","type","specification","of","an","element","of","`","tf.distribute.DistributedIterator","`",".","Example","usage",":",">",">",">","global_batch_size","=","16",">",">",">","strategy","=","tf.distribute.MirroredStrategy","(","[","``","GPU:0","''",",","``","GPU:1","''","]",")",">",">",">","dataset","=","tf.data.Dataset.from_tensors","(","(","[","1",".","]",",","[","2","]",")",")",".repeat","(","100",")",".batch","(","global_batch_size",")",">",">",">","distributed_iterator","=","iter","(","strategy.experimental_distribute_dataset","(","dataset",")",")",">",">",">","distributed_iterator.element_spec","(","PerReplicaSpec","(","TensorSpec","(","shape=","(","None",",","1",")",",","dtype=tf.float32",",","name=None",")",",","TensorSpec","(","shape=","(","None",",","1",")",",","dtype=tf.float32",",","name=None",")",")",",","PerReplicaSpec","(","TensorSpec","(","shape=","(","None",",","1",")",",","dtype=tf.int32",",","name=None",")",",","TensorSpec","(","shape=","(","None",",","1",")",",","dtype=tf.int32",",","name=None",")",")",")","Returns",":","A","nested","structure","of","`","tf.TypeSpec","`","objects","matching","the","structure","of","an","element","of","this","`","tf.distribute.DistributedIterator","`",".","This","returned","value","is","typically","a","`","tf.distribute.DistributedValues","`","object","and","specifies","the","`","tf.TensorSpec","`","of","individual","components","."]
code: def element_spec(self):
      # pylint: disable=line-too-long
      """The type specification of an element of `tf.distribute.DistributedIterator`.
  
      Example usage:
  
      >>> global_batch_size = 16
      >>> strategy = tf.distribute.MirroredStrategy(["GPU:0", "GPU:1"])
      >>> dataset = tf.data.Dataset.from_tensors(([1.],[2])).repeat(100).batch(global_batch_size)
      >>> distributed_iterator = iter(strategy.experimental_distribute_dataset(dataset))
      >>> distributed_iterator.element_spec
      (PerReplicaSpec(TensorSpec(shape=(None, 1), dtype=tf.float32, name=None),
                      TensorSpec(shape=(None, 1), dtype=tf.float32, name=None)),
       PerReplicaSpec(TensorSpec(shape=(None, 1), dtype=tf.int32, name=None),
                      TensorSpec(shape=(None, 1), dtype=tf.int32, name=None)))
  
      Returns:
        A nested structure of `tf.TypeSpec` objects matching the structure of an
        element of this `tf.distribute.DistributedIterator`. This returned value
        is typically a `tf.distribute.DistributedValues` object and specifies the
        `tf.TensorSpec` of individual components.
      """
      raise NotImplementedError(
          "DistributedIterator.element_spec() must be implemented in descendants"
      )
  
imports: from tensorflow.python.util.tf_export import tf_export
  from tensorflow.tools.docs import doc_controls
label_desc: Use image node_id 2 for calling the DistributedIteratorInterface obj's underlying member method code with example usage: obj.element_spec() without return types