Thanks, will do that.
Also, the weird thing is I got it working by setting the steps_per_epoch and validation_steps manually.
model.fit(train_dataset_gen  , epochs = 3, 
                    steps_per_epoch = 62.5 , 
                    validation_data = valid_dataset_gen , 
                    validation_steps = 10)

Log
Epoch 1/3
Found 2000 images belonging to 2 classes.
63/62 [==============================] - ETA: -1s - loss: 0.6973 - accuracy: 0.4990Found 1000 images belonging to 2 classes.
62/62 [==============================] - 189s 3s/step - loss: 0.6973 - accuracy: 0.4990 - val_loss: 0.6936 - val_accuracy: 0.5063
Epoch 2/3
63/62 [==============================] - ETA: -1s - loss: 0.6958 - accuracy: 0.4830Found 1000 images belonging to 2 classes.
62/62 [==============================] - 188s 3s/step - loss: 0.6958 - accuracy: 0.4830 - val_loss: 0.6921 - val_accuracy: 0.5250
Epoch 3/3
63/62 [==============================] - ETA: -1s - loss: 0.6950 - accuracy: 0.5025Found 1000 images belonging to 2 classes.
62/62 [==============================] - 188s 3s/step - loss: 0.6950 - accuracy: 0.5025 - val_loss: 0.6921 - val_accuracy: 0.5188
<tensorflow.python.keras.callbacks.History at 0x7f427aacfdd0>

But not sure whether it’s the right way of doing things.
All I know is we can’t use a len() function on a generator, but by using tf.data.dataset.from_generator() returns a dataset right?