Mnist Data Classification Not Working On Google Colab
Solution 1:
The 844 does not represent the number of samples it is getting trained on, but it represents number of steps per epoch.
What is the number of steps?
The number of steps is equivalent no of passes ie(1 pass = 1 Forward Pass + 1 Backward pass)
that occurs in an epoch.
The number of steps is calculated as:
no_of_steps_per_epoch = ceil(Total_no_of_samples / batch_size)
For completion of one epoch, you have to iterate over the entire dataset. ie. iterate over all the batches.
For eg: X_train has 60000 samples. You have specified validation_split as 0.1. Therefore, 0.1 % of this X_train will be used as validation data. ie. It will not be used for training.
Therefore, the number of samples for training will be (60000 - 6000) = 54000.
Now you have specified batch_size as 64. Therefore,
no_of_steps_per_epoch = ceil(54000/64) = ceil(843.74) = 844
This is how you get 844.
It does not mean you are training on 844 samples.
Post a Comment for "Mnist Data Classification Not Working On Google Colab"