GeLU.java

  1. package neureka.backend.main.operations.functions;

  2. import neureka.backend.main.implementations.fun.api.ScalarFun;

  3. /**
  4.  *  The GELU activation function is based on the standard Gaussian cumulative distribution function
  5.  *  and is defined as {@code x Φ( x )} and implemented as {@code x * sigmoid(x * 1.702)}.
  6.  *  The GELU non-linearity weighs inputs by their percentile,
  7.  *  rather than gates inputs by their sign as in ReLUs.
  8.  *  Consequently, the GELU can be thought of as a smoother ReLU.
  9.  */
  10. public class GeLU extends AbstractActivationOperation
  11. {
  12.     public GeLU() {
  13.         super(ScalarFun.GELU);
  14.     }
  15. }