Great job ! But i think you did a small mistake when checking the validation score : you are averaging rmse of different batches. You'd rather store the predictions and then calculate the rmse.
Interesting, I thought averaging rmse of all batches will give the same results as store the predictions and then calculate the rmse. But I was wrong. I just updated the check_accuracy and hopefully fix the mistake.
This is the updated check accuracy, can you review it and see if I'm checking the accuracy the right way:
your function was false before because you tend to return the loss of only the last batch, and it is the same to return the average of each batch loss or the loss of all predictions with a reduction="mean".
and this function does't return the accuracy (the fraction of correctly predicted divided by the total of predictions), here you are looking for the validation loss (!=train loss: you can't use numpy to calculate loss for a grading train function).
Thanks @TAUIL_Abdelilah for sharing your hard work
Thanks @TAUIL_Abdelilah How elegant it is!
Great job ! But i think you did a small mistake when checking the validation score : you are averaging rmse of different batches. You'd rather store the predictions and then calculate the rmse.
Interesting, I thought averaging rmse of all batches will give the same results as store the predictions and then calculate the rmse. But I was wrong. I just updated the check_accuracy and hopefully fix the mistake.
This is the updated check accuracy, can you review it and see if I'm checking the accuracy the right way:
Thanks for the feadback @Reacher.
yes it is ok now !
hi @TAUIL_Abdelilah ,
your function was false before because you tend to return the loss of only the last batch, and it is the same to return the average of each batch loss or the loss of all predictions with a reduction="mean".
and this function does't return the accuracy (the fraction of correctly predicted divided by the total of predictions), here you are looking for the validation loss (!=train loss: you can't use numpy to calculate loss for a grading train function).