I am using a CNN to train on some data, where training size = 21700 samples, and test size is 653 samples, and say I am using a batch_size of 500 (I am accounting for samples out of batch size as well).
I have been looking this up for a long time now, but can't get a clear answer, but when plotting the loss functions to check for whether the model is overfitting or not, do I plot as follows
for j in range(num_epochs): <some training code---Take gradient descent step do wonders> batch_loss=0 for i in range(num_batches_train): batch_loss = something....criterion(target,output)... total_loss += batch_loss Losses_Train_Per_Epoch.append(total_loss/num_samples_train)#and this is
where I need help
Losses_Train_Per_Epoch.append(total_loss/num_batches_train) and doing the same for Losses_Validation_Per_Epoch. plt.plot(Losses_Train_Per_Epoch, Losses_Validation_Per_epoch)
So, basically, what I am asking is, should I divide by num_samples or num_batches or batch_size? Which one is it?