評價此頁

propagate_qconfig#

class torch.ao.quantization.propagate_qconfig_(module, qconfig_dict=None, prepare_custom_config_dict=None)[原始碼]#

透過模組層級傳播 qconfig,並在每個葉子模組上分配 `qconfig` 屬性

引數
  • module – 輸入模組

  • qconfig_dict – 一個字典,它將子模組的名稱或型別對映到量化配置。除非為子模組指定了 qconfig(當子模組已具有 qconfig 屬性時),否則 qconfig 將應用於給定模組的所有子模組。

  • prepare_custom_config_dict – 用於自定義模組處理的字典,請參閱 `prepare_fx()` 函式的文件。

返回

None,模組被就地修改並附加了 qconfig