Skip to content
Snippets Groups Projects
Commit a2df11e8 authored by Jeppe Gade's avatar Jeppe Gade
Browse files

Fixed display of running loss

parent f9fe34d1
No related branches found
No related tags found
No related merge requests found
......@@ -53,8 +53,8 @@ def train_one_epoch(yolo_network, train_loader):
# print statistics
running_loss.append(loss.item())
if i % 500 == 499: # print every 500 mini-batches
print(f'[{epoch + 1}, {i + 1:5d}] loss: {sum(running_loss) / 2000:.3f}')
if i % 200 == 199: # print every 200 mini-batches
print(f'[{epoch + 1}, {i + 1:5d}] loss: {sum(running_loss) / 200:.3f}')
running_loss = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment