From 6482bf84162240724ab7a084b1dd5716877b95ca Mon Sep 17 00:00:00 2001 From: Corentin Dancette Date: Wed, 1 Jul 2020 18:05:01 +0200 Subject: [PATCH] flake8 --- bootstrap/engines/engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/engines/engine.py b/bootstrap/engines/engine.py index 86a74a4..88c63a8 100755 --- a/bootstrap/engines/engine.py +++ b/bootstrap/engines/engine.py @@ -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)):