<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/modeling/activations/swish.py#L20-L38) |

Computes the Swish activation function.

    tfm.utils.activations.simple_swish(
        features
    )

The tf.nn.swish operation uses a custom gradient to reduce memory usage.
Since saving custom gradients in SavedModel is currently not supported, and
one would not be able to use an exported TF-Hub module for fine-tuning, we
provide this wrapper that can allow to select whether to use the native
TensorFlow swish operation, or whether to use a customized operation that
has uses default TensorFlow gradient computation.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `features` | A `Tensor` representing preactivation values. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The activation value. ||

<br />