快捷方式

torch.nn.utils.fuse_linear_bn_weights

torch.nn.utils.fuse_linear_bn_weights(linear_w, linear_b, bn_rm, bn_rv, bn_eps, bn_w, bn_b)[source][source]

將 Linear 模組引數和 BatchNorm 模組引數融合到新的 Linear 模組引數中。

引數
返回值

融合後的 Linear 權重和偏置。

返回型別

Tuple[torch.nn.Parameter, torch.nn.Parameter]

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源