message: Remove unused `PerIterationDataset`.
diff: @@ -1285,100 +1285,6 @@ class MultiWorkerDataset(object):
  return MultiWorkerDataIterator(iterators, self._worker_device_pairs)
  -class _PerKey(object):
  - """Holds data associated by keys."""
  -
  - def __init__(self, *index):
  - # pylint: disable=protected-access
  - self._index = list(index)
  -
  - def get(self, iteration):
  - return array_ops.gather(self._index, iteration)
  -
  - def get_shape(self):
  - return self._index[-1][-1].get_shape()
  -
  - def get_dtype(self):
  - return self._index[-1][-1].dtype
  -
  - def __str__(self):
  - return "%s:%s" % (self.__class__.__name__, self._index)
  -
  - def __repr__(self):
  - return "%s(%r)" % (self.__class__.__name__, self._index)
  -
  -
  -class PerIteration(_PerKey):
  - """Holds input for multiple iterations at once."""
  -
  - def __init__(self, *index):
  - # pylint: disable=protected-access
  - super(PerIteration, self).__init__(*[batch._index for batch in index])
  -
  -
  -class Batches(_PerKey):
  - pass
  -
  -
  -class MultiIterator(object):
  - """Iterator that returns results of multiple get_next()s."""
  -
  - def __init__(self, dataset_iterator, iterations, batches_per_iteration):
  - self._dataset_iterator = dataset_iterator
  - self._iterations = iterations
  - self._batches_per_iteration = batches_per_iteration
  -
  - def get_next(self, name=None):
  - """Return PerIteration with `iterations x batches_per_iteration` inputs."""
  - data = []
  - for _ in range(self._batches_per_iteration):
  - batch = []
  - for _ in range(self._iterations):
  - batch.append(self._dataset_iterator.get_next(name=name))
  - data.append(batch)
  -
  - # Here is an example. Suppose each get_next returns a tuple of two tensors.
  - # For 3 `iterations` and 2 `batches_per_iteration`, the `data` is:
  - # [[(a,z), (b,y), (c,x)], [(A,Z), (B,Y), (C,X)]]
  - #
  - # After the first `map_structure` it gets transformed to:
  - # [(Batches(a, A), Batches(z, Z)),
  - # (Batches(b, B), Batches(y, Y)),
  - # (Batches(c, C), Batches(x, X))]
  - #
  - # After the second `map_structure` it gets transformed to a tuple of:
  - # (PerIteration([Batches(a, A), Batches(b, B), Batches(c, C)]),
  - # PerIteration([Batches(z, Z), Batches(y, Y), Batches(x, X)]))
  -
  - data = nest.map_structure(Batches, *data)
  - data = nest.map_structure(PerIteration, *data)
  -
  - return data
  -
  - @property
  - def initializer(self):
  - return self._dataset_iterator.initializer
  -
  -
  -class PerIterationDataset(object):
  - """A dataset that returns MultiIterators."""
  -
  - def __init__(self, dataset, iterations, batches_per_iteration):
  - self._dataset = dataset
  - self._iterations = iterations
  - self._batches_per_iteration = batches_per_iteration
  -
  - def make_one_shot_iterator(self):
  - iterator = self._dataset.make_one_shot_iterator()
  - return MultiIterator(iterator, self._iterations,
  - self._batches_per_iteration)
  -
  - def make_initializable_iterator(self):
  - iterator = self._dataset.make_initializable_iterator()
  - return MultiIterator(iterator, self._iterations,
  - self._batches_per_iteration)
  -
  -
  class MapOutput(object):
  """Map can result in multiple outputs per device."""
  