






"""simple docstring"""


from torch import nn




def       snake_case  (A_				:str				):







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












"""simple docstring"""


def       snake_case  (A_				:str     ,      A_				:bool = False				):







  '''simple docstring'''

  if not isinstance(A_     ,      A_				):
    a					:      Union[str, Any]    =       f'''Expected string as input, found {type(A_				)}'''
    raise ValueError(A_				)
  if not isinstance(A_     ,      A_				):
    a					:      Optional[int]    =       f'''Expected boolean as use_pascal parameter, found {type(A_				)}'''
    raise ValueError(A_				)

  a					:      Tuple    =       input_str.split('_'				)

  a					:      Dict    =       0 if use_pascal else 1

  a					:      int    =       words[start_index:]

  a					:      int    =       [word[0].upper() + word[1:] for word in words_to_capitalize]

  a					:      List[str]    =       '' if use_pascal else words[0]

  return "".join([initial_word, *capitalized_words]				)


if __name__ == "__main__":
   from doctest import testmod

   testmod()




