cerebras.modelzoo.data.nlp.t5.t5_utils.flat_map#
- cerebras.modelzoo.data.nlp.t5.t5_utils.flat_map(fn, dataset)[source]#
Map a function over an iterator and flatten the result.
- Parameters
fn (callable) – The function to apply to each element.
dataset (iterator) – A stream of elements to map fn over.
- Yields
A flattened version of fn applied to each element of dataset.