




'''simple docstring'''







from torch import nn





def 						snake_case_							(_a	:							List[Any]     ):
    if act_fn in ["swish", "silu"]:
        return nn.SiLU()
    elif act_fn == "mish":
        return nn.Mish()
    elif act_fn == "gelu":
        return nn.GELU()
    else:
        raise ValueError(F"Unsupported activation function: {act_fn}"     )










'''simple docstring'''







from ..utils import DummyObject, requires_backends


class 			_a  (	metaclass=__a ):
       __a				:     int   				=					["""flax""", """transformers"""]
       def __init__(	self						:	Optional[Any]   ,				*lowercase						:	str   ,				**lowercase						:	List[Any]				):



           '''simple docstring'''

           requires_backends(self   ,				['''flax''', '''transformers''']				)
       @classmethod
       def     A      (	cls						:	Union[str, Any]   ,				*lowercase						:	List[Any]   ,				**lowercase						:	List[str]				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)







       @classmethod
       def     A      (	cls						:	Union[str, Any]   ,				*lowercase						:	Tuple   ,				**lowercase						:	int				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)






class 			_a  (	metaclass=__a ):
       __a				:     int   				=					["""flax""", """transformers"""]
       def __init__(	self						:	int   ,				*lowercase						:	Tuple   ,				**lowercase						:	Dict				):



           '''simple docstring'''

           requires_backends(self   ,				['''flax''', '''transformers''']				)
       @classmethod
       def     A      (	cls						:	List[str]   ,				*lowercase						:	Optional[int]   ,				**lowercase						:	List[Any]				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)







       @classmethod
       def     A      (	cls						:	Dict   ,				*lowercase						:	Union[str, Any]   ,				**lowercase						:	Union[str, Any]				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)






class 			_a  (	metaclass=__a ):
       __a				:     int   				=					["""flax""", """transformers"""]
       def __init__(	self						:	Optional[int]   ,				*lowercase						:	Union[str, Any]   ,				**lowercase						:	Any				):



           '''simple docstring'''

           requires_backends(self   ,				['''flax''', '''transformers''']				)
       @classmethod
       def     A      (	cls						:	Union[str, Any]   ,				*lowercase						:	Tuple   ,				**lowercase						:	Any				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)







       @classmethod
       def     A      (	cls						:	Any   ,				*lowercase						:	Dict   ,				**lowercase						:	Optional[Any]				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)






class 			_a  (	metaclass=__a ):
       __a				:     Any   				=					["""flax""", """transformers"""]
       def __init__(	self						:	Any   ,				*lowercase						:	Optional[Any]   ,				**lowercase						:	Optional[int]				):



           '''simple docstring'''

           requires_backends(self   ,				['''flax''', '''transformers''']				)
       @classmethod
       def     A      (	cls						:	Dict   ,				*lowercase						:	Optional[Any]   ,				**lowercase						:	Optional[Any]				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)







       @classmethod
       def     A      (	cls						:	Union[str, Any]   ,				*lowercase						:	str   ,				**lowercase						:	Any				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)




