Why tensorflow dataset neet to be batched before fit?

Solution for Why tensorflow dataset neet to be batched before fit?
is Given Below:

If we’ve made tensorflow dataset (for example from from_tensor_slices) we need to use .batch(…) method before we set this dataset as parameter of function fit(). Question is why method “fit” expect dataset to be batched ?

Datasets are sliced or batched for following reasons.

  1. To avoid high memory usage if entire Dataset is used as one batch ( which might create Out of Memory problems)

  2. Computation is faster when Training is done in Batches

  3. Weight and Bias update is possible with respect to labels when training is done is batches.

Reference:
https://medium.com/@elimu.michael9/understanding-epochs-and-batches-23120a04b3cb