From ffed2c9c72f7d247ed8a3cef81f1b6d0105a87d2 Mon Sep 17 00:00:00 2001 From: Langelo Date: Sun, 15 Jan 2023 20:26:44 +0800 Subject: [PATCH] fix bug --- mmedit/models/losses/gan_loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmedit/models/losses/gan_loss.py b/mmedit/models/losses/gan_loss.py index 407e6a3adb..bb57b52e59 100644 --- a/mmedit/models/losses/gan_loss.py +++ b/mmedit/models/losses/gan_loss.py @@ -421,7 +421,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor: def r1_gradient_penalty_loss(discriminator: nn.Module, real_data: torch.Tensor, - mask: Optional(torch.Tensor) = None, + mask: Optional[torch.Tensor] = None, norm_mode: str = 'pixel', loss_scaler: Optional[GradScaler] = None, use_apex_amp: bool = False) -> torch.Tensor: