Relu  // Elementwise relu operation


Name Element Type Shape
arg Any Any


Name Element Type Shape
output Same as arg Same as arg

Mathematical Definition

\[\begin{split}\mathtt{output}_{i_0, \ldots, i_{n-1}} = \begin{cases} 0&\text{if }\mathtt{arg}_{i_0, \ldots, i_{n-1}} \le 0 \\ \mathtt{arg}_{i_0, \ldots, i_{n-1}}&\text{otherwise} \end{cases}\end{split}\]

C++ Interface

class Relu : public ngraph::op::util::UnaryElementwiseArithmetic

Elementwise Relu operation.

Public Functions

const NodeTypeInfo &get_type_info() const

Returns the NodeTypeInfo for the node’s class. During transition to type_info, returns a dummy type_info for Node if the class has not been updated yet.

Relu(const Output<ngraph::Node> &arg)

Constructs a Relu operation.

  • arg: Node that produces the input tensor.