torch.__future__
- torch.__future__.set_overwrite_module_params_on_conversion(value)
Sets whether to assign new tensors to the parameters instead of changing the existing parameters in-place when converting an
nn.Module.When enabled, the following methods will assign new parameters to the module:
module.{device}()(e.g.nn.Module.cuda()) for moving a module between devices