pytorch / 1 / generated / torch.quantization.observer.placeholderobserver.html

PlaceholderObserver

class torch.quantization.observer.PlaceholderObserver(dtype=torch.float32, custom_op_name='', compute_dtype=None) [source]

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.
  • 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 – if set, marks the future quantize function to use dynamic quantization instead of static quantization. Note: this field will be removed in the near future and replaced with is_dynamic.

© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/1.13/generated/torch.quantization.observer.PlaceholderObserver.html