Skip to content

Commit 98e9e85

Browse files
committed
train.py: Print elapsed time instead of time per epoch
1 parent 451ef6e commit 98e9e85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ def main(args):
155155
scheduler = torch.optim.lr_scheduler.ReduceLROnPlateau(optimizer, mode='min', factor=0.1, patience=1, verbose=True, min_lr=1e-6)
156156

157157
# Main training loop
158+
start = time.monotonic()
158159
num_batches = len(train_data_loader)
159160
epoch = 0
160161
running_train_loss = 0.0
161162
while True:
162163
best_val_loss = 1000000.0
163-
start = time.monotonic()
164164

165165
for k, sample in enumerate(train_data_loader):
166166
train_loss = train_step(nnue, sample, optimizer, args.lambda_, epoch, k, num_batches)

0 commit comments

Comments
 (0)