/usr/local/lib64/python3.6/site-packages/torch
NameSizeModeActions
ao/-0755rm
autograd/-0755rm
backends/-0755rm
bin/-0755rm
contrib/-0755rm
cpu/-0755rm
cuda/-0755rm
distributed/-0755rm
distributions/-0755rm
fft/-0755rm
for_onnx/-0755rm
futures/-0755rm
fx/-0755rm
include/-0755rm
jit/-0755rm
lib/-0755rm
linalg/-0755rm
multiprocessing/-0755rm
nn/-0755rm
onnx/-0755rm
optim/-0755rm
package/-0755rm
profiler/-0755rm
quantization/-0755rm
share/-0755rm
sparse/-0755rm
special/-0755rm
testing/-0755rm
utils/-0755rm
_C/-0755rm
__pycache__/-0755rm
autocast_mode.py96630644editdlrm
functional.py712570644editdlrm
hub.py233710644editdlrm
overrides.py841460644editdlrm
py.typed00644editdlrm
quasirandom.py74890644editdlrm
random.py48280644editdlrm
serialization.py365440644editdlrm
storage.py57620644editdlrm
torch_version.py34680644editdlrm
types.py15520644editdlrm
version.py1250644editdlrm
_appdirs.py262450644editdlrm
_C.cpython-36m-x86_64-linux-gnu.so292960755editdlrm
_classes.py17170644editdlrm
_deploy.py31000644editdlrm
_dl.cpython-36m-x86_64-linux-gnu.so298320755editdlrm
_jit_internal.py469100644editdlrm
_linalg_utils.py23730644editdlrm
_lobpcg.py440760644editdlrm
_lowrank.py110310644editdlrm
_namedtensor_internals.py53510644editdlrm
_ops.py44570644editdlrm
_python_dispatcher.py70110644editdlrm
_six.py18580644editdlrm
_sources.py38820644editdlrm
_storage_docs.py12980644editdlrm
_tensor.py508540644editdlrm
_tensor_docs.py1134740644editdlrm
_tensor_str.py180910644editdlrm
_torch_docs.py3646780644editdlrm
_utils.py216170644editdlrm
_utils_internal.py16870644editdlrm
_VF.py6560644editdlrm
_vmap_internals.py132190644editdlrm
__config__.py5510644editdlrm
__future__.py8130644editdlrm
__init__.py311990644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/_classes.py (1717B)
import types import torch._C class _ClassNamespace(types.ModuleType): def __init__(self, name): super(_ClassNamespace, self).__init__('torch.classes' + name) self.name = name def __getattr__(self, attr): proxy = torch._C._get_custom_class_python_wrapper(self.name, attr) if proxy is None: raise RuntimeError(f'Class {self.name}.{attr} not registered!') return proxy class _Classes(types.ModuleType): __file__ = '_classes.py' def __init__(self): super(_Classes, self).__init__('torch.classes') def __getattr__(self, name): namespace = _ClassNamespace(name) setattr(self, name, namespace) return namespace @property def loaded_libraries(self): return torch.ops.loaded_libraries def load_library(self, path): """ Loads a shared library from the given path into the current process. The library being loaded may run global initialization code to register custom classes with the PyTorch JIT runtime. This allows dynamically loading custom classes. For this, you should compile your class and the static registration code into a shared library object, and then call ``torch.classes.load_library('path/to/libcustom.so')`` to load the shared object. After the library is loaded, it is added to the ``torch.classes.loaded_libraries`` attribute, a set that may be inspected for the paths of all libraries loaded using this function. Args: path (str): A path to a shared library to load. """ torch.ops.load_library(path) # The classes "namespace" classes = _Classes()