Skip to content

Commit

Permalink
Merge pull request #14 from CottonCandyZ/patch-1
Browse files Browse the repository at this point in the history
Remove repeated loss calculations.
  • Loading branch information
anosorae authored Apr 12, 2023
2 parents 9fff385 + 1d10157 commit 8b5af4d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions processor/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ def do_train(start_epoch, args, model, train_loader, evaluator, optimizer,
ret = model(batch)
total_loss = sum([v for k, v in ret.items() if "loss" in k])

total_loss = sum([v for k, v in ret.items() if "loss" in k])

batch_size = batch['images'].shape[0]
meters['loss'].update(total_loss.item(), batch_size)
meters['sdm_loss'].update(ret.get('sdm_loss', 0), batch_size)
Expand Down

0 comments on commit 8b5af4d

Please sign in to comment.