what is really happening in the single epoch forward or backward pass or both?
With a batch size of 25 and steps per epoch=40 you will go through 1000 samples. It works like this. For EACH step 25 samples are provided. So after 40 steps you have gone through 25 X 40 samples. If you run for 10 epochs the total training samples processed will be 10 X 1000=10,000. I haven't tried it but I think if you set the steps per epoch say to 50 it will run 25 X 50 samples. I get this from the Keras documentation from model.fit.

steps_per_epoch: Integer or None. Total number of steps (batches of samples) before declaring one epoch finished and starting the next epoch. When training with input tensors such as TensorFlow data tensors, the default None is equal to the number of samples in your dataset divided by the batch size, or 1 if that cannot be determined.

So I believe this leads to the definition of an epoch as being completed when samples of batch_size X steps per epoch is completed. The generator will just keep cycling as more batches are called for.
For instance,
I have 1000 rows and 10 columns,
batch size is 25,
steps per epoch =1000/25 ==> 40
epoch = 10
Epoch 1:
|----------------------|40 iterations # so in this only 40 samples are propagated right? or wrong?
so , 10* 40 = 400 so 400 values are only propagated ?