# Equal¶

Equal  // Elementwise equal operation


## Description¶

Produces tensor of the same element type and shape as the two inputs, where the value at each coordinate of output is 1 (true) if arg0 is equal to arg1, 0 otherwise.

### Inputs¶

Name Element Type Shape
arg0 any any
arg1 same as arg0 same as arg0

### Outputs¶

Name Element Type Shape
output ngraph::element::boolean same as arg0

## Mathematical Definition¶

$\mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}} == \mathtt{arg1}_{i_0, \ldots, i_{n-1}}$

## C++ Interface¶

class Equal : public ngraph::op::util::BinaryElementwiseComparison

Elementwise is-equal operation.

## Inputs

| | Type | Description | | —— | ——————————— | —————————————————— | | arg0 | $$E[d_1,\dots,d_n]~(n \geq 0)$$ | A tensor of any shape and element type. | | arg1 | $$E[d_1,\dots,d_n]~(n \geq 0)$$ | A tensor of the same shape and element type as arg0. |

## Output

| Type | Description | | ———————————- | —————————————————————————————————————————————— | | $$\texttt{bool}[d_1,\dots,d_n]$$ | The tensor $$T$$, where $$T[i_1,\dots,i_n] = 1\text{ if }\texttt{arg0}[i_1,\dots,i_n] = \texttt{arg1}[i_1,\dots,i_n]\text{, else } 0$$ |

Public Functions

Equal(const std::shared_ptr<Node> &arg0, const std::shared_ptr<Node> &arg1)

Constructs an is-equal operation.

Parameters
• arg0: Node that produces the first input tensor.
• arg1: Node that produces the second input tensor.