MCPcopy Index your code
hub / github.com/tensorflow/models / _shuffle_and_decode

Method _shuffle_and_decode

official/core/input_reader.py:469–475  ·  view source on GitHub ↗
(ds)

Source from the content-addressed store, hash-verified

467 """Returns a tf.data.Dataset object after shuffling, decoding, and parsing."""
468
469 def _shuffle_and_decode(ds):
470 # If cache is enabled, we will call `shuffle()` later after `cache()`.
471 if self._is_training and not self._cache:
472 ds = ds.shuffle(self._shuffle_buffer_size, seed=self._seed)
473 # Decode
474 ds = _maybe_map_fn(ds, self._decoder_fn)
475 return ds
476
477 dataset = tf.nest.map_structure(_shuffle_and_decode, dataset)
478 if tf.nest.is_nested(dataset):

Callers

nothing calls this directly

Calls 1

_maybe_map_fnFunction · 0.85

Tested by

no test coverage detected