瀏覽代碼

Remove repeated loss calculations.

cotton_candyZ 1 年之前
父節點
當前提交
1d10157952
共有 1 個文件被更改,包括 0 次插入2 次删除
  1. 0 2
      processor/processor.py

+ 0 - 2
processor/processor.py

@@ -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)