Skip to content

Commit 819755b

Browse files
authored
Update train.py
added '(per batch)' in the print statement in the logs for the training process
1 parent 47daf31 commit 819755b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def plot_losses(running_train_loss, running_val_loss, train_epoch_loss, val_epoc
148148
if (batch_idx + 1)%log_interval == 0:
149149
batch_time = time.time() - batch_start_time
150150
m,s = divmod(batch_time, 60)
151-
print('train loss @batch_idx {}/{}: {} in {} mins {} secs'.format(str(batch_idx+1).zfill(len(str(len(train_loader)))), len(train_loader), loss.item(), int(m), round(s, 2)))
151+
print('train loss @batch_idx {}/{}: {} in {} mins {} secs (per batch)'.format(str(batch_idx+1).zfill(len(str(len(train_loader)))), len(train_loader), loss.item(), int(m), round(s, 2)))
152152

153153
train_epoch_loss.append(np.array(running_train_loss).mean())
154154

0 commit comments

Comments
 (0)