mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Part of #123062 - #123062 Pull Request resolved: https://github.com/pytorch/pytorch/pull/128864 Approved by: https://github.com/ezyang
20 lines
427 B
Python
20 lines
427 B
Python
# mypy: allow-untyped-defs
|
|
# torch.ao is a package with a lot of interdependencies.
|
|
# We will use lazy import to avoid cyclic dependencies here.
|
|
|
|
|
|
__all__ = [
|
|
"nn",
|
|
"ns",
|
|
"quantization",
|
|
"pruning",
|
|
]
|
|
|
|
|
|
def __getattr__(name):
|
|
if name in __all__:
|
|
import importlib
|
|
|
|
return importlib.import_module("." + name, __name__)
|
|
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|