Skip to content

Commit 4c4782e

Browse files
author
Fabio Ferreira
committed
fix: linting issues
1 parent a2e8474 commit 4c4782e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

monai/networks/nets/unet.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
class _ActivationCheckpointWrapper(nn.Module):
3030
"""Apply activation checkpointing to the wrapped module during training."""
31+
3132
def __init__(self, module: nn.Module) -> None:
3233
super().__init__()
3334
self.module = module
@@ -309,9 +310,11 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
309310
x = self.model(x)
310311
return x
311312

313+
312314
class CheckpointUNet(UNet):
313315
def _get_connection_block(self, down_path: nn.Module, up_path: nn.Module, subblock: nn.Module) -> nn.Module:
314316
subblock = _ActivationCheckpointWrapper(subblock)
315317
return super()._get_connection_block(down_path, up_path, subblock)
316318

319+
317320
Unet = UNet

0 commit comments

Comments
 (0)