class_docstr: Builds py:class:`QConfigMapping` from :py:class:`LinearQuantizerConfig`.
class_docstr_tok: ["Builds","py",":","class",":","`","QConfigMapping","`","from",":","py",":","class",":","`","LinearQuantizerConfig","`","."]
docstr: Returns default QConfig for a given quantization types
docstr_tok: ["Returns","default","QConfig","for","a","given","quantization","types"]
code: def _get_default_qconfig_from_quantization_scheme(
      quantization_scheme: _QuantizationScheme,
  ) -> _aoquant.QConfig:
      """
      Returns default QConfig for a given quantization types
      """
      return _aoquant.QConfig(
          activation=_aoquant.FakeQuantize.with_args(
              observer=_ObserverType.get_observer(
                  _default_quantization_options["observer"],
                  is_per_channel=False,
              ),
              dtype=_default_quantization_options["activation_dtype"],
              qscheme=_QuantizationScheme.get_qscheme(
                  quantization_scheme, is_per_channel=False
              ),
          ),
          weight=_aoquant.FakeQuantize.with_args(
              observer=_ObserverType.get_observer(
                  _default_quantization_options["observer"],
                  is_per_channel=_default_quantization_options[
                      "weight_per_channel"
                  ],
              ),
              dtype=_default_quantization_options["weight_dtype"],
              qscheme=_QuantizationScheme.get_qscheme(
                  quantization_scheme,
                  is_per_channel=_default_quantization_options[
                      "weight_per_channel"
                  ],
              ),
          ),
      )
  
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 1 for calling the _QConfigMappingBuilder obj's underlying member method code with example usage: obj._get_default_qconfig_from_quantization_scheme(quantization_scheme) and returns: _aoquant