misc changes

This commit is contained in:
James Betker 2020-12-18 08:53:45 -07:00
parent a8179ff53c
commit 2f0a52b7db
2 changed files with 7 additions and 4 deletions

View File

@ -19,10 +19,10 @@ def main():
# compression time. If read raw images during training, use 0 for faster IO speed.
opt['dest'] = 'file'
opt['input_folder'] = 'F:\\4k6k\\datasets\\ns_images\\imagesets\\images'
opt['save_folder'] = 'F:\\4k6k\\datasets\\ns_images\\imagesets\\256_with_ref_v3'
opt['input_folder'] = 'F:\\4k6k\\datasets\\images\youtube\\4k_quote_unquote\\images_1'
opt['save_folder'] = 'F:\\4k6k\\datasets\\images\\youtube_massive'
opt['crop_sz'] = [512, 1024, 2048] # the size of each sub-image
opt['step'] = [256, 512, 1024] # step of the sliding crop window
opt['step'] = [512, 1024, 2048] # step of the sliding crop window
opt['exclusions'] = [[],[],[]] # image names matching these terms wont be included in the processing.
opt['thres_sz'] = 256 # size threshold
opt['resize_final_img'] = [.5, .25, .125]

View File

@ -45,7 +45,10 @@ def OrderedYaml():
# Conditionally uses torch's checkpoint functionality if it is enabled in the opt file.
def checkpoint(fn, *args):
enabled = loaded_options['checkpointing_enabled'] if 'checkpointing_enabled' in loaded_options.keys() else True
if loaded_options is None:
enabled = False
else:
enabled = loaded_options['checkpointing_enabled'] if 'checkpointing_enabled' in loaded_options.keys() else True
if enabled:
return torch.utils.checkpoint.checkpoint(fn, *args)
else: