Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Nov 18, 2023
1 parent 49e221b commit f39018c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ def _build_input_queue(
weights = torch.as_tensor(
batch['weights'], dtype=torch.bool, device=DEVICE)
else:
weights = torch.ones_like(targets,
dtype=torch.bool,
device=DEVICE)
weights = torch.ones_like(targets, dtype=torch.bool, device=DEVICE)
# Send batch to other devices when using DDP.
if USE_PYTORCH_DDP:
dist.broadcast(inputs, src=0)
Expand Down
4 changes: 1 addition & 3 deletions algorithmic_efficiency/workloads/mnist/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ def _eval_model_on_split(self,
batch,
model_state,
per_device_model_rngs)
total_metrics = {
k: v + batch_metrics[k] for k, v in total_metrics.items()
}
total_metrics = {k: v + batch_metrics[k] for k, v in total_metrics.items()}

return self._normalize_eval_metrics(num_examples, total_metrics)

0 comments on commit f39018c

Please sign in to comment.