Class ov::op::v4::Swish#

class Swish : public ov::op::Op#

A Swish Activation Function f(x) = x / (1.0 + exp(-beta * x)) or f(x) = x * sigmoid(beta * x)

Public Functions

Swish(const Output<Node> &arg, const Output<Node> &beta)#

Constructs an Swish operation.

  • dataInput tensor

  • beta – Scalar with beta value. If the argument is not specified then use the default value 1.0

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.