Shortcuts

mmcv.cnn.fuse_conv_bn

mmcv.cnn.fuse_conv_bn(module: torch.nn.modules.module.Module)torch.nn.modules.module.Module[源代码]

Recursively fuse conv and bn in a module.

During inference, the functionary of batch norm layers is turned off but only the mean and var alone channels are used, which exposes the chance to fuse it with the preceding conv layers to save computations and simplify network structures.

参数

module (nn.Module) – Module to be fused.

返回

Fused module.

返回类型

nn.Module