Shortcuts

传播量化配置

class torch.ao.quantization.propagate_qconfig_(module, qconfig_dict=None, prepare_custom_config_dict=None)[源代码]

通过模块层次结构传播qconfig,并在每个叶模块上分配qconfig属性

Parameters
  • 模块 – 输入模块

  • qconfig_dict – 将子模块的名称或类型映射到量化配置的字典,qconfig适用于给定模块的所有子模块,除非为子模块指定了qconfig(当子模块已经具有qconfig属性时)

  • prepare_custom_config_dict – 用于自定义处理模块的字典 参见 prepare_fx() 的文档

Returns

无,模块在原地修改并附加了qconfig

优云智算