code: def swish(x, name="swish"):
      """Swish function.
  
       See `Swish: a Self-Gated Activation Function <https://arxiv.org/abs/1710.05941>`__.
  
      Parameters
      ----------
      x : Tensor
          input.
      name: str
          function name (optional).
  
      Returns
      -------
      Tensor
          A ``Tensor`` in the same type as ``x``.
  
      """
      # TODO: in this case, the beta = 1, but the beta can either be a constant or a trainable parameter
      with tf.name_scope(name):
          x = tf.nn.sigmoid(x) * x
      return x
  
file_path: TensorLayer/tensorlayer/activation.py
imports: import tensorflow
  from tensorlayer.decorators import deprecated
label_desc: Use image node_id 5 for calling a global function with example usage: swish(x, name) and returns: x