(norm)
return norm
Args:
        norm (str): currently support "BN", "SyncBN", "FrozenBN", "GN", "LN" and "IN"

    Returns:
        M.Module or None: the normalization layer
Args:
        norm (str): currently support "BN", "SyncBN", "FrozenBN", "GN", "LN" and "IN"
Args : norm ( str ) : currently support BN SyncBN FrozenBN GN LN and IN
def get_norm(norm):
    """
    Args:
        norm (str): currently support "BN", "SyncBN", "FrozenBN", "GN", "LN" and "IN"

    Returns:
        M.Module or None: the normalization layer
    """
    if norm is None:
        return None
    norm = {
        "BN": M.BatchNorm2d,
        "SyncBN": M.SyncBatchNorm,
        "FrozenBN": partial(M.BatchNorm2d, freeze=True),
        "GN": GroupNorm,
        "LN": LayerNorm,
        "IN": InstanceNorm,
    }[norm]
    return norm
def get_norm ( norm ) : if norm is None : return None norm = { "BN" : M . BatchNorm2d , "SyncBN" : M . SyncBatchNorm , "FrozenBN" : partial ( M . BatchNorm2d , freeze = True ) , "GN" : GroupNorm , "LN" : LayerNorm , "IN" : InstanceNorm , } [ norm ] return norm