Week 05 – Training Cifar-10 – Jenny

In order to find the Cifar-10 well, I tried to adjust two parameters, the batch size and epoch. The batch size means how many data are we going to select and train each time. Epoch means how many times are we going to train the whole data set in total.

Generally if you increase the epoch, the accuracy will definitely increase. I tried to adjust epoch number to 50 but I failed to run so much time. It seemed that I need to take three or four hours to finish the whole training process so I just changed the epoch number to 5. 

Under this condition, I simply adjust the batch size to 32, 64, 1280 and 2560. When the batch size is 32, test loss is 1.0839 and test accuracy is 0.6203.

1

When the batch size is 64, test loss is 1.2065 and test accuracy is 0.5686.

2

When the batch size is 1280, test loss is 1.7189 and test accuracy is 0.3912.

3

When the batch size is 2560, test loss is 1.8184 and test accuracy is 0.3663.

4

When the epoch is 5, it seems that as batch size increases, the test loss will increase and the test accuracy will decrease. In this case, when batch size is 32, we get the best test accuracy which is 0.6203. 

But here we need to notice that under different number of epoch, the optimal number of batch size might be different as well. In order to better train Cifar-10 model (get the highest possible test accuracy), we need to increase the number of epoch to 50 or even 100 and try to find the optimal batch size under that condition. We should notice that the total number of data set = batch size * #of iteration / epoch. Both the #of iteration and the #of epoch will have some effect on the test accuracy.

Leave a Reply