Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
remove redundant lines
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhuang13 committed Jan 18, 2022
1 parent b9dd6b5 commit f7608df
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module,
optimizer.zero_grad()

for data_iter_step, (samples, targets) in enumerate(metric_logger.log_every(data_loader, print_freq, header)):
# if data_iter_step > 20:
# break
step = data_iter_step // update_freq
if step >= num_training_steps_per_epoch:
continue
Expand Down Expand Up @@ -132,9 +130,7 @@ def evaluate(data_loader, model, device, use_amp=False):

# switch to evaluation mode
model.eval()
i = 0
for batch in metric_logger.log_every(data_loader, 10, header):
i += 1
images = batch[0]
target = batch[-1]

Expand Down

0 comments on commit f7608df

Please sign in to comment.