def get_act_fn(name: Union[Callable, str] = 'relu'):
    """
    Activation Function Factory

    Fetching activation fns 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 callable(name) is True:
        return name
    return _ACT_FN_DEFAULT[name]
Activation Function Factory

Fetching activation fns 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