Fix recursive checkpoint
This commit is contained in:
parent
3cbb9ecd45
commit
c896939523
|
@ -47,7 +47,7 @@ def OrderedYaml():
|
||||||
def checkpoint(fn, *args):
|
def checkpoint(fn, *args):
|
||||||
enabled = options.loaded_options['checkpointing_enabled'] if 'checkpointing_enabled' in options.loaded_options.keys() else True
|
enabled = options.loaded_options['checkpointing_enabled'] if 'checkpointing_enabled' in options.loaded_options.keys() else True
|
||||||
if enabled:
|
if enabled:
|
||||||
return checkpoint(fn, *args)
|
return torch.utils.checkpoint.checkpoint(fn, *args)
|
||||||
else:
|
else:
|
||||||
return fn(*args)
|
return fn(*args)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user