From c8969395235e153eed70d36c844f4c1e441e7a05 Mon Sep 17 00:00:00 2001 From: James Betker Date: Sat, 3 Oct 2020 16:15:52 -0600 Subject: [PATCH] Fix recursive checkpoint --- codes/utils/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/utils/util.py b/codes/utils/util.py index cf904807..35fc227f 100644 --- a/codes/utils/util.py +++ b/codes/utils/util.py @@ -47,7 +47,7 @@ def OrderedYaml(): def checkpoint(fn, *args): enabled = options.loaded_options['checkpointing_enabled'] if 'checkpointing_enabled' in options.loaded_options.keys() else True if enabled: - return checkpoint(fn, *args) + return torch.utils.checkpoint.checkpoint(fn, *args) else: return fn(*args)