fuse_modules.py 913 B

123456789101112131415161718192021222324
  1. # flake8: noqa: F401
  2. r"""
  3. This file is in the process of migration to `torch/ao/quantization`, and
  4. is kept here for compatibility while the migration process is ongoing.
  5. If you are adding a new entry/functionality, please, add it to the
  6. `torch/ao/quantization/fuse_modules.py`, while adding an import statement
  7. here.
  8. """
  9. from torch.ao.quantization.fuse_modules import fuse_modules
  10. from torch.ao.quantization.fuse_modules import fuse_known_modules
  11. from torch.ao.quantization.fuse_modules import get_fuser_method
  12. # for backward compatiblity
  13. from torch.ao.quantization.fuser_method_mappings import fuse_conv_bn
  14. from torch.ao.quantization.fuser_method_mappings import fuse_conv_bn_relu
  15. # TODO: These functions are not used outside the `fuse_modules.py`
  16. # Keeping here for now, need to remove them later.
  17. from torch.ao.quantization.fuse_modules import (
  18. _fuse_modules,
  19. _get_module,
  20. _set_module,
  21. )