swish¶
- dragon.vm.tensorflow.keras.activations.- swish(x)[source]¶
- Apply the swish function. [Ramachandran et.al, 2017]. - The Swish function is defined as: \[\text{Swish}(x) = x \cdot \frac{1}{1 + \exp(-x)} \]- Examples: - x = tf.constant([-2.5, -1.0, 0.0, 1.0, 2.5]) print(tf.keras.activations.swish(x)) - Parameters:
- x (dragon.Tensor) – The input tensor.
 
 - Returns:
- dragon.Tensor – The output tensor. 
 
