快捷方式

FuseCustomConfig

class torch.ao.quantization.fx.custom_config.FuseCustomConfig[source][source]

用於 fuse_fx() 的自訂配置。

範例用法

fuse_custom_config = FuseCustomConfig().set_preserved_attributes(["attr1", "attr2"])
classmethod from_dict(fuse_custom_config_dict)[source][source]

從具有以下項目的字典建立一個 ConvertCustomConfig

“preserved_attributes”: 一個屬性列表,即使它們沒有在 forward 中使用,也會保留這些屬性

此函數主要用於向後相容性,將來可能會被移除。

回傳類型

FuseCustomConfig

set_preserved_attributes(attributes)[原始碼][原始碼]

設定將在圖模組中保留的屬性名稱,即使它們沒有在模型的 forward 方法中使用。

回傳類型

FuseCustomConfig

to_dict()[原始碼][原始碼]

將此 FuseCustomConfig 轉換為一個字典,其項目描述於 from_dict() 中。

回傳類型

Dict[str, Any]

文件

取得 PyTorch 的全面開發者文件

檢視文件

教學

取得適用於初學者和高級開發人員的深入教學

檢視教學

資源

尋找開發資源並取得您的問題解答

檢視資源