code: def act_fn(act):
      if act == "relu":
          act_ = nn.ReLU(inplace=False)
      elif act == "lrelu":
          act_ = nn.LeakyReLU(inplace=True)
      elif act == "prelu":
          act_ = nn.PReLU()
      elif act == "rrelu":
          act_ = nn.RReLU(inplace=True)
      elif act == "elu":
          act_ = nn.ELU(inplace=True)
      elif act == "selu":
          act_ = nn.SELU(inplace=True)
      elif act == "tanh":
          act_ = nn.Tanh()
      elif act == "sigmoid":
          act_ = nn.Sigmoid()
      else:
          print(
              "\n\nActivation function {} is not supported/understood\n\n".format(
                  act
              )
          )
          act_ = None
      return act_
  
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: act_fn(act) and returns: act_