Open samiulhq opened 3 months ago
loss = loss_fn(y_pred, y) train_loss += loss # accumulatively add up the loss per epoch
I believe this is accumulatively adding up the loss per batch to get the total loss per epoch.
2. Calculate loss (per batch)
I believe this is accumulatively adding up the loss per batch to get the total loss per epoch.