Table of Contents
Shortcuts

# PlaceholderObserver

class torch.ao.quantization.observer.PlaceholderObserver(dtype=torch.float32, custom_op_name='', compute_dtype=None, quant_min=None, quant_max=None, qscheme=None, eps=None, is_dynamic=False)

  Observer that doesn’t do anything and just passes its configuration to the quantized module’s `.from_float()`.

  Can be used for quantization to float16 which doesn’t require determining ranges.

  Parameters:

    - dtype – dtype argument to the quantize node needed to implement the reference model spec.

    - quant_min – minimum value in quantized domain (TODO: align behavior with other observers)

    - quant_max – maximum value in quantized domain

    - custom_op_name – (temporary) specify this observer for an operator that doesn’t require any observation (Can be used in Graph Mode Passes for special case ops).

    - compute_dtype (deprecated) – if set, marks the future quantize function to use dynamic quantization instead of static quantization. This field is deprecated, use is_dynamic=True instead.

    - is_dynamic – if True, the quantize function in the reference model representation taking stats from this observer instance will use dynamic quantization.

## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

## Resources

Find development resources and get your questions answered

View Resources

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.