@vabh
You are right. I believe I’ve referenced this in my previous posts as well. Unfortunately, this still doesn’t answer my question on how does the system know that I’m training instead of testing. Is it just that I don’t call loss.backward() and don’t propagate the gradients and update the weights?
@tom
Thank you for this! This is exactly what I’ve been looking for!
This looks great, but I have one question. It is my understanding that when we decide to validate the model we just use the entire dataset instead of going mini-batch by mini-batch. If we decide to do that, do you just keep track of the running loss and running acc for the validation set’s each mini-batch and average it out to number of mini-batches? Or just use val_loader.val_ds.data directly for prediction?