Last answered:

13 Apr 2022

Posted on:

07 Apr 2022

0

what does the method num_examples do?

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)
Instructor
Posted on:

13 Apr 2022

2

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

Submit an answer