From 2d8e9a9d3021a1663278a905ec838ff349fb3f0a Mon Sep 17 00:00:00 2001 From: James Betker Date: Sat, 3 Oct 2020 20:27:12 -0600 Subject: [PATCH] Options fix? --- codes/utils/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codes/utils/util.py b/codes/utils/util.py index c3ca12b8..1f2f82d1 100644 --- a/codes/utils/util.py +++ b/codes/utils/util.py @@ -14,7 +14,7 @@ from torchvision.utils import make_grid from shutil import get_terminal_size import scp import paramiko -import options.options as options +from options.options import loaded_options from torch.utils.checkpoint import checkpoint import yaml @@ -45,7 +45,7 @@ def OrderedYaml(): # Conditionally uses torch's checkpoint functionality if it is enabled in the opt file. def checkpoint(fn, *args): - enabled = options.loaded_options['checkpointing_enabled'] if 'checkpointing_enabled' in options.loaded_options.keys() else True + enabled = loaded_options['checkpointing_enabled'] if 'checkpointing_enabled' in loaded_options.keys() else True if enabled: return torch.utils.checkpoint.checkpoint(fn, *args) else: