state_dict
- UNet.state_dict(*args, destination=None, prefix='', keep_vars=False)
- Returns a dictionary containing references to the whole state of the module. - Both parameters and persistent buffers (e.g. running averages) are included. Keys are corresponding parameter and buffer names. Parameters and buffers set to - Noneare not included.- Note - The returned object is a shallow copy. It contains references to the module’s parameters and buffers. - Warning - Currently - state_dict()also accepts positional arguments for- destination,- prefixand- keep_varsin order. However, this is being deprecated and keyword arguments will be enforced in future releases.- Warning - Please avoid the use of argument - destinationas it is not designed for end-users.- Parameters:
- destination (dict, optional) – If provided, the state of module will be updated into the dict and the same object is returned. Otherwise, an - OrderedDictwill be created and returned. Default:- None.
- prefix (str, optional) – a prefix added to parameter and buffer names to compose the keys in state_dict. Default: - ''.
- keep_vars (bool, optional) – by default the - Tensors returned in the state dict are detached from autograd. If it’s set to- True, detaching will not be performed. Default:- False.
 
- Returns:
- a dictionary containing a whole state of the module 
- Return type:
 - Example: - >>> # xdoctest: +SKIP("undefined vars") >>> module.state_dict().keys() ['bias', 'weight']