misc changes
This commit is contained in:
parent
a8179ff53c
commit
2f0a52b7db
|
@ -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]
|
||||
|
|
|
@ -45,6 +45,9 @@ def OrderedYaml():
|
|||
|
||||
# Conditionally uses torch's checkpoint functionality if it is enabled in the opt file.
|
||||
def checkpoint(fn, *args):
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user