From 54891e9a748f088dbff6cb3059f5ef231cacc96a Mon Sep 17 00:00:00 2001 From: Xintao Date: Thu, 26 Aug 2021 21:55:19 +0800 Subject: [PATCH] fix ddp bug in EDVR --- basicsr/models/edvr_model.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/basicsr/models/edvr_model.py b/basicsr/models/edvr_model.py index 0683b838b..3f6fb8715 100644 --- a/basicsr/models/edvr_model.py +++ b/basicsr/models/edvr_model.py @@ -1,5 +1,3 @@ -from torch.nn.parallel import DistributedDataParallel - from basicsr.utils import get_root_logger from basicsr.utils.registry import MODEL_REGISTRY from .video_base_model import VideoBaseModel @@ -60,8 +58,5 @@ def optimize_parameters(self, current_iter): logger.warning('Train all the parameters.') for param in self.net_g.parameters(): param.requires_grad = True - if isinstance(self.net_g, DistributedDataParallel): - logger.warning('Set net_g.find_unused_parameters = False.') - self.net_g.find_unused_parameters = False super(EDVRModel, self).optimize_parameters(current_iter)