register_state_dict_pre_hook
- UNet.register_state_dict_pre_hook(hook)
Register a pre-hook for the
state_dict()method.These hooks will be called with arguments:
self,prefix, andkeep_varsbefore callingstate_dictonself. The registered hooks can be used to perform pre-processing before thestate_dictcall is made.