class_docstr: Builds py:class:`QConfigMapping` from :py:class:`LinearQuantizerConfig`.
class_docstr_tok: ["Builds","py",":","class",":","`","QConfigMapping","`","from",":","py",":","class",":","`","LinearQuantizerConfig","`","."]
docstr: Enforces Embedding layers to use float qparams, because that's preferred
  by prepare_qat_fx.
docstr_tok: ["Enforces","Embedding","layers","to","use","float","qparams",",","because","that","'s","preferred","by","prepare_qat_fx","."]
code: def _adjust_qconfig_for_module_type(
      mod_type: _Any, qconfig: _aoquant.QConfig
  ):
      """
      Enforces Embedding layers to use float qparams, because that's preferred
      by prepare_qat_fx.
      """
      if mod_type == _torch.nn.Embedding:
          weight = qconfig.weight()
          return _aoquant.QConfig(
              activation=_aoquant.NoopObserver.with_args(
                  dtype=_torch.float
              ),
              weight=_aoquant.FakeQuantize.with_args(
                  observer=type(weight.activation_post_process),
                  dtype=weight.dtype,
                  qscheme=_torch.per_channel_affine_float_qparams,
              ),
          )
      return qconfig
  
file_path: coremltools/coremltools/optimize/torch/quantization/_qconfig_mapping.py
imports: from typing import Any
  from typing import Optional
  import torch
  import torch.ao.quantization
  import torch.nn
  from coremltools.optimize.torch.quantization._backend_config import _fixed_qparams_modules
  from coremltools.optimize.torch.quantization._backend_config import get_supported_modules
  from coremltools.optimize.torch.quantization.quantization_config import LinearQuantizerConfig
  from coremltools.optimize.torch.quantization.quantization_config import ModuleLinearQuantizerConfig
  from coremltools.optimize.torch.quantization.quantization_config import ObserverType
  from coremltools.optimize.torch.quantization.quantization_config import QuantizationScheme
  from coremltools.optimize.torch.quantization.quantization_config import _default_quantization_options
label_desc: Use image node_id 2 for calling the _QConfigMappingBuilder obj's underlying member method code with example usage: obj._adjust_qconfig_for_module_type(mod_type, qconfig) and returns: qconfig, _aoquant