Shortcuts

mmcv.cnn.is_norm

mmcv.cnn.is_norm(layer: Module, exclude: type | tuple | None = None) bool[source]

Check if a layer is a normalization layer.

Parameters:
  • layer (nn.Module) – The layer to be checked.

  • exclude (type | tuple[type]) – Types to be excluded.

Returns:

Whether the layer is a norm layer.

Return type:

bool