Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
cdancette authored and Cadene committed Jul 17, 2020
1 parent 05b7ce5 commit 6482bf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bootstrap/engines/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def train_epoch(self, model, dataset, optimizer, epoch, mode='train'):
for key, value in out.items():
if torch.is_tensor(value):
if value.numel() <= 1:
value = value.item() # get number from a torch scalar
value = value.item() # get number from a torch scalar
else:
continue
if isinstance(value, (list, dict, tuple)):
Expand Down

0 comments on commit 6482bf8

Please sign in to comment.