what does the method num_examples do?
in
Deep Learning with TensorFlow 2
/
Preprocess the data - create a validation dataset and scale the data
please the method num_examples what is it used for in the line of code
num_validaion_samples = 0.1*mnist_info.splits['train'].num_examples
1 answers ( 0 marked as helpful)
Hi,
.num_exapmples
returns the number of datapoints in the dataset. In other words, it's the dataset size.
In this code, we want to create a validation dataset that is 10% of the size of the training dataset. So, the size of the validation set would be validation_size = 0.1*training_size
training_size
in this case is mnist_info.splits['train'].num_examples
Best,
Nikola Pulev, 365 Team