def get_act_layer(name: Union[Type[nn.Module], str] = 'relu'):
    """
    Activation Layer Factory
    Fetching activation layers by name with this function allows export or torch script friendly
    functions to be returned dynamically based on current config.
    """
    if not name:
        return None
    if isinstance(name, type):
        return name
    return _ACT_LAYER_DEFAULT[name]
Activation Layer Factory
Fetching activation layers by name with this function allows export or torch script friendly
functions to be returned dynamically based on current config.
towhee/models/utils/create_act.py