Class ov::op::v7::Gelu#

class Gelu : public ov::op::util::UnaryElementwiseArithmetic#

Gaussian Error Linear Unit f(x) = 0.5 * x * (1 + erf( x / sqrt(2) ) for “approximation” = “erf” f(x) = 0.5 * x * (1 + tanh([sqrt(2 / pi)] * [x + 0.044715^3]) for “approximation” = “tanh”.

Public Functions

Gelu(const Output<Node> &data, GeluApproximationMode mode = GeluApproximationMode::ERF)#

Constructs a Gelu operation.

Parameters:
  • dataInput tensor

  • mode – Approximation mode

virtual void validate_and_infer_types() override#

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual bool has_evaluate() const override#

Allows to get information about availability of evaluate method for the current operation.