捷徑

propagate_qconfig

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

透過模組層級結構傳播 qconfig,並在每個葉模組上指派 qconfig 屬性

參數
  • module – 輸入模組

  • qconfig_dict – 字典,用於將子模組的名稱或類型映射到量化配置(quantization configuration),除非指定了子模組的 qconfig(當子模組已經有 qconfig 屬性時),否則 qconfig 適用於給定模組的所有子模組。

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

回傳值

None,模組會被修改,並附加 qconfig (原地修改)。

文件

存取 PyTorch 的完整開發者文件

檢視文件

教學

獲取針對初學者和高級開發者的深度教學

檢視教學

資源

尋找開發資源並獲得問題解答

檢視資源