
'''simple docstring'''

from abc import ABC, abstractmethod
from argparse import ArgumentParser


class  _UpperCAmelCase ( lowerCAmelCase__    ):

     """simple docstring"""

     @staticmethod
     @abstractmethod
     def 							_lowerCAmelCase  (      lowerCAmelCase_ ):

       '''simple docstring'''

       raise NotImplementedError()






     @abstractmethod
     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       raise NotImplementedError()




'''simple docstring'''

from torch import nn






def 	_snake_case						(      A_       :    Dict   ):
  """simple docstring"""







  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}'''   )


