W3cubDocs

/PyTorch 2.9

torch.utils.set_module

torch.utils.set_module(obj, mod) [source]

Set the module attribute on a python object for a given object for nicer printing

© 2025, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.9/generated/torch.utils.set_module.html