MBZ
MBZ

Reputation: 27632

Does `tf.data.Dataset.map` preserve the input order?

Does tf.data.Dataset.map() preserve the order of input elements?
Specially when num_parallel_calls > 1?

Upvotes: 5

Views: 994

Answers (1)

mrry
mrry

Reputation: 126184

Yes, Dataset.map() produces transformed elements in the same order that the original elements appeared in the input, for all values of num_parallel_calls.

Upvotes: 8

Related Questions