W3cubDocs

/PyTorch 2.9

enable_observer

class torch.ao.quantization.fake_quantize.enable_observer(mod) [source]

Enable observation for this module.

Enable observation for this module, if applicable. Example usage:

# model is any PyTorch model
model.apply(torch.ao.quantization.enable_observer)

© 2025, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.9/generated/torch.ao.quantization.fake_quantize.enable_observer.html