I created a tf.data.Dataset and want to train a model using this dataset:
dataset = dataset.prefeth()
dataset = dataset.shuffle()
dataset = dataset.repeat()
dataset = dataset.map()
dataset = dataset.filter()
dataset = dataset.batch()
I want to know what is the difference between the above dataset with the bellow one:
dataset = dataset.prefeth()
dataset = dataset.shuffle()
dataset = dataset.repeat()
dataset = dataset.apply(tf.contrib.data.map_and_batch())
I know that they should not be different except in performance. But I don't know should I use the .apply() method or not?
Is the first implementation correct?