From 8c469b8286aefd94f44017dc4c0ea2310650b709 Mon Sep 17 00:00:00 2001 From: James Betker Date: Fri, 11 Sep 2020 08:44:29 -0600 Subject: [PATCH] Enable memory checkpointing --- codes/models/archs/SwitchedResidualGenerator_arch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/models/archs/SwitchedResidualGenerator_arch.py b/codes/models/archs/SwitchedResidualGenerator_arch.py index ed82d015..ac875237 100644 --- a/codes/models/archs/SwitchedResidualGenerator_arch.py +++ b/codes/models/archs/SwitchedResidualGenerator_arch.py @@ -11,7 +11,7 @@ from torch.utils.checkpoint import checkpoint # Set to true to relieve memory pressure by using torch.utils.checkpoint in several memory-critical locations. -memory_checkpointing_enabled = False +memory_checkpointing_enabled = True # VGG-style layer with Conv(stride2)->BN->Activation->Conv->BN->Activation