Fix TF 2.0 tf.data API usage.
Fix TF 2.0 tf.data API usage.

PiperOrigin-RevId: 268401010

alexgorban/models,alexgorban/models,alexgorban/models,tombstone/models,alexgorban/models,tombstone/models,tombstone/models,tombstone/models,tombstone/models,alexgorban/models,tombstone/models