On this page
swap_module
class torch.quantization.swap_module(mod, mapping, custom_module_class_mapping)[source]-
Swaps the module if it has a quantized counterpart and it has an
observerattached.- Parameters:
-
- mod – input module
- mapping – a dictionary that maps from nn module to nnq module
- Returns:
-
The corresponding quantized module of
mod
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/1.13/generated/torch.quantization.swap_module.html