DeepLearningDTU / 02456-deep-learning-with-PyTorch

Exercises and supplementary material for the deep learning course 02456 using PyTorch.
319 stars 457 forks source link

Lab4 Validation loss overestimation #7

Closed Faur closed 6 years ago

Faur commented 6 years ago

Andrea:

The data generation script has some weird stuff going on, and the main notebook works around that by using minibatch-based evaluation. If the validation set is 99, this breaks unless the training batch size is at least 99. The loss is computed using 3 minibatches with size 32 and one with size 3. But actually the last one has still size 32 and the last 29 examples all have labels 0, so after some training this part of the validation set will have a huge loss. Everything works anyway, but the validation loss (NLL) is overestimated a lot.

Faur commented 6 years ago

Fixed in cf461d004cbc40f839640a5e8207346e2e191b2d