class Swish

class Swish

Element-wise swish function, by Ramachandran et al.

(2017).

\[ y_i = \frac{x_i}{1 + \exp(-x_i)}. \]

Inputs:

  • N-D array.

Outputs:

  • N-D array with the same shape as input.

See also

Prajit Ramachandran, Barret Zoph, and Quoc V. Le, Swish: a Self-Gated Activation Function, arXiv:1710.05941 [cs.NE] https://arxiv.org/abs/1710.05941

Template Parameters:

T – Data type for computation.