1# mypy: allow-untyped-defs 2# torch.ao is a package with a lot of interdependencies. 3# We will use lazy import to avoid cyclic dependencies here. 4 5 6__all__ = [ 7 "nn", 8 "ns", 9 "quantization", 10 "pruning", 11] 12 13 14def __getattr__(name): 15 if name in __all__: 16 import importlib 17 18 return importlib.import_module("." + name, __name__) 19 raise AttributeError(f"module {__name__!r} has no attribute {name!r}") 20