From 6000580e2eb22db0e5b7e0924474e5b2413b5c57 Mon Sep 17 00:00:00 2001 From: James Betker Date: Fri, 4 Mar 2022 13:47:00 -0700 Subject: [PATCH] df --- codes/trainer/ExtensibleTrainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/trainer/ExtensibleTrainer.py b/codes/trainer/ExtensibleTrainer.py index 1b940f94..8c297152 100644 --- a/codes/trainer/ExtensibleTrainer.py +++ b/codes/trainer/ExtensibleTrainer.py @@ -453,7 +453,7 @@ class ExtensibleTrainer(BaseModel): for k, v in log.items(): if not isinstance(v, torch.Tensor): continue - if v.len(v.shape) != 1 or v.dtype != torch.float: + if len(v.shape) != 1 or v.dtype != torch.float: continue distributed.all_reduce(v, op=distributed.ReduceOp.SUM) log[k] = v / distributed.get_world_size()