class_docstr: Flatten-T Swish activation definition.
  
  FTSwish(x) = x * sigmoid(x) + threshold
                where FTSwish(x) < 0 = threshold
  
  Reference: https://arxiv.org/abs/1812.06247
  
  Args:
      threshold: Threshold value for FTSwish activation formulation. (threshold < 0)
      mean_shift: Mean shifting value for FTSwish activation formulation.
                     (applied only if != 0, disabled by default)
class_docstr_tok: ["Flatten-T","Swish","activation","definition",".","FTSwish","(","x",")","=","x","*","sigmoid","(","x",")","+","threshold","where","FTSwish","(","x",")","<","0","=","threshold","Reference",":","https",":","\/\/arxiv.org\/abs\/1812.06247","Args",":","threshold",":","Threshold","value","for","FTSwish","activation","formulation",".","(","threshold","<","0",")","mean_shift",":","Mean","shifting","value","for","FTSwish","activation","formulation",".","(","applied","only","if","!","=","0",",","disabled","by","default",")"]
code: def __init__(
      self, threshold: float = -0.2, mean_shift: float = 0
  ) -> None:
      super().__init__()
  
      assert threshold < 0, "FTSwish threshold parameter should be < 0."
  
      self.threshold = threshold
      self.mean_shift = mean_shift
  
file_path: espnet/espnet2/asr_transducer/activation.py
imports: import torch
  from packaging.version import parse
label_desc: Use image node_id 1 to create a new FTSwish object from inherited base classes: torch.nn with example: obj = FTSwish(threshold, mean_shift)