Defines how to transform other
when loading it into self
in load_state_dict()
.
Used when get_swap_module_params_on_conversion()
is True
.
It is expected that self
is a parameter or buffer in an nn.Module
and other
is the value in the state dictionary with the corresponding key, this method defines how other
is remapped before being swapped with self
via swap_tensors()
in load_state_dict()
.
Note
This method should always return a new object that is not self
or other
. For example, the default implementation returns self.copy_(other).detach()
if assign
is False
or other.detach()
if assign
is True
.
other (Tensor) – value in state dict with key corresponding to self
assign (bool) – the assign argument passed to nn.Module.load_state_dict()
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4