Not // Elementwise negation operation


Produces a single output tensor of boolean type and the same shape as arg, where the value at each coordinate of output is the negation of the value at each arg coordinate.


Name Element Type Shape
arg element::boolean Any


Name Element Type Shape
output element::boolean Same as arg

Mathematical Definition

\[\mathtt{output}_{i_0, \ldots, i_{n-1}} = \neg\mathtt{arg}_{i_0, \ldots, i_{n-1}}\]

C++ Interface

class Not : public ngraph::op::Op

Elementwise logical negation 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.


Constructs a logical negation operation.

Not(const Output<Node> &arg)

Constructs a logical negation operation.

  • arg: Node that produces the input tensor.

void validate_and_infer_types()

Throws if the node is invalid.