Shortcuts

mmcv.cnn.build_plugin_layer

mmcv.cnn.build_plugin_layer(cfg: Dict, postfix: Union[int, str] = '', **kwargs)Tuple[str, torch.nn.modules.module.Module][源代码]

Build plugin layer.

参数
  • cfg (dict) –

    cfg should contain:

    • type (str): identify plugin layer type.

    • layer args: args needed to instantiate a plugin layer.

  • postfix (int, str) – appended into norm abbreviation to create named layer. Default: ‘’.

返回

The first one is the concatenation of abbreviation and postfix. The second is the created plugin layer.

返回类型

tuple[str, nn.Module]